Reputation: 23
I have a doubt in sql server which can be very basic or stupid for someone but i have the curiosity to know that why use of semicolon is not necessary to terminate the statement in sql server, that means how it comes to know that the statement has to be terminated at the particular point.
It would be great if anyone can help me knowing this.Thanks in advance
Upvotes: -1
Views: 564
Reputation: 9298
Although not required in all cases, it is good practice to use them as the documentation states that they will be required in a future version, although it's been saying that for a long time, you might as well just use them.
Also, there are some instances where you do indeed need to terminate a statement with a semi-colon, such as directly preceding a CTE for example.
Upvotes: 2