As I am working on a project which requires login for different roles, like one for Consultant and other for Employee. so I have created two login pages. so is this a good idea to create two login page?
Asked
Active
Viewed 94 times
-1
-
separate batches – Daniel Marcus May 16 '18 at 20:02
-
https://learn.microsoft.com/en-us/sql/t-sql/language-elements/sql-server-utilities-statements-go?view=sql-server-2017 – Pankaj Gadge May 16 '18 at 20:03
-
https://learn.microsoft.com/en-us/sql/t-sql/language-elements/sql-server-utilities-statements-go?view=sql-server-2017 – JNevill May 16 '18 at 20:03
-
1@PankajGadge Niiiiiice :) – JNevill May 16 '18 at 20:03
-
Why not read the documentation https://learn.microsoft.com/en-us/sql/t-sql/language-elements/sql-server-utilities-statements-go?view=sql-server-2017? – jwize May 16 '18 at 20:43
-
I have edited the question as it was similar to other question , please have a look in the edited one. – gaurav patni May 17 '18 at 08:01
2 Answers
0
Here's a trivial example:
declare @var int=1
select @var
go
declare @var int=1
select @var
Without GO separating the batches here, you couldn't redeclare the same variable twice
Daniel Marcus
- 2,686
- 1
- 7
- 13
0
SQL Server provides commands that are not Transact-SQL statements, but are recognized by the sqlcmd and osql utilities and SQL Server Management Studio Code Editor. These commands can be used to facilitate the readability and execution of batches and scripts.
GO signals the end of a batch of Transact-SQL statements to the SQL Server utilities. SYNTAX : GO [count]
count is a positive integer. The batch preceding GO will execute the specified number of times.
Jayveer Gangwar
- 1
- 1