开发者

@ oracle equivalent in postgres

How can i run multiple sql files from one main sql files in postgres.

For exam开发者_高级运维ple in oracle Inside Main.sql i can specify n number of @Child.sql , and then i can run Main.sql to run all child.sql 's .

How can i do this in the postgres.

Thanks! Pratik


\i is the psql equivalent of the Oracle SQL*Plus @ command.

If you're using psql to run the Main.sql script, you can put:

\i path/to/child.sql

... in Main.sql. The difference between this and the EXECUTE SCRIPT command pointed out by Tzury is that there the path in FILENAME would refer to a path on the server's file system, while the \i command refers to a path on the machine running psql.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜