I'm continuing my quest on creating a database migration framework, and I'm currently trying to implement proper support for native (platform-dependent) SQL scripts.
From a SQL Server standpoint I know that a single .sql
may contain several batches of SQL separated by GO
terminators. GO
itself is not a valid T-SQL keyword/whatever and is used purely to separate batches.
What I want to know is this: what keywords/identifiers/etc. are used to separate batches in other DBMSes, like SQLite, Oracle, etc., if any.
EDIT
In SQL Server, batches are used both to group and to separate statements. For example, CREATE SCHEMA
statement should be the first statement in a b开发者_StackOverflowatch, so it should be preceded by the GO
keyword/identifier. I assume other systems have same concepts.
PL/SQL (Oracle) uses /
If by 'Batch' you mean a single file containing more than one SQL "statement" (e.g. a group of insert or update statements) then you can use a ; to separate them in MySQL
精彩评论