Hello,
I'm trying to execute a file containing few SQL statements.
CREATE VIEW test1 AS SELECT * FROM table1;
CREATE VIEW test2 AS SELECT * FROM table2;
The standard SQL way is to end a statement with semi-colon.
But doing that,it doesn't work in SQL Server.
After changing ";" to "GO", it works fine.
Is there anyway we can stick to ";" to indicate the end of statement.
I don't want to create scripts which works only in SQL Server.
Please comment.
Thanks in advance.
I'm trying to execute a file containing few SQL statements.
CREATE VIEW test1 AS SELECT * FROM table1;
CREATE VIEW test2 AS SELECT * FROM table2;
The standard SQL way is to end a statement with semi-colon.
But doing that,it doesn't work in SQL Server.
After changing ";" to "GO", it works fine.
Is there anyway we can stick to ";" to indicate the end of statement.
I don't want to create scripts which works only in SQL Server.
Please comment.
Thanks in advance.
Comment