Database Research & Development

  • Home
  • NoSQL
    • NoSQL
    • Cassandra
  • Databases
    • Database Theory
    • Database Designing
    • SQL Server Coding Standards
    • SQL Server
    • PostgreSQL
    • MySQL
    • Greenplum
    • Linux
  • Interviews
    • SQL Server Interviews
    • MySQL Interviews
    • SQL Puzzles
  • DBA Scripts
    • SQL Server DBA Scripts
    • PostgreSQL DBA Scripts
    • MySQL DBA Scripts
    • Greenplum DBA Scripts
  • Home
  • Blog Archives !
  • (: Laugh@dbrnd :)
  • Contact Me !
sqlserverinterviews
Home 2018 March SQL Server: The use of Semicolons is a good habit, Don’t forget it

SQL Server: The use of Semicolons is a good habit, Don’t forget it

This article is half-done without your Comment! *** Please share your thoughts via Comment ***

In my overall career, I worked on multiple RDBMS/NoSQL systems. As per the ANSI SQL, SQL statements are terminated by semicolons. If you are working on MySQL or PostgreSQL then a semicolon is a mandatory between multiple SQL statements.

Most of the SQL Server DB guys are confused between “GO” and semicolon. “GO” is a default identifier which uses as a batch separator where a semicolon is a terminator of a SQL Statement.

The semicolon is a not a mandatory in SQL Server because by default SQL statements are terminated with semicolons.
But we must terminate the statement by using the semicolon which is the best practice.
In some cases, I got a wrong error message for those SQL Statements which are not ended by semicolons.

If you are a programmer and know the C, C++ or JAVA, you know that statement terminator is mandatory for the compiler.

Microsoft technologies are good, but they are changing and upgrading their versions very speedy. So in the future, there may be a chance of announcement like “Semicolon as a statement terminator is compulsory in SQL Server”, and after that, you can assume what will happen. You have to update all your DB Codes.

I would suggest, please don’t wait for anything and give explicitly semicolon at the end of your SQL Statement.

SQL Server: How to change the default “GO” Batch Separator?

Mar 19, 2018Anvesh Patel
SQL Server: How to remove IDENTITY from a Column?SQL Server: How to ESCAPE Square Brackets in LIKE?

Leave a Reply Cancel reply

CAPTCHA
Refresh

*

Anvesh Patel
Anvesh Patel

Database Engineer

March 19, 2018 Database Theory, SQL ServerAnvesh Patel, Batch Separator, database, database research and development, dbrnd, Semicolon, SQL Query, SQL Server, SQL Server Administrator, SQL Server Error, SQL Server Monitoring, SQL Server Performance Tuning, SQL Server Programming, SQL Server Tips and Tricks, TSQL
About Me!

I'm Anvesh Patel, a Database Engineer certified by Oracle and IBM. I'm working as a Database Architect, Database Optimizer, Database Administrator, Database Developer. Providing the best articles and solutions for different problems in the best manner through my blogs is my passion. I have more than six years of experience with various RDBMS products like MSSQL Server, PostgreSQL, MySQL, Greenplum and currently learning and doing research on BIGData and NoSQL technology. -- Hyderabad, India.

About DBRND !

dbrnd

This is a personal blog (www.dbrnd.com).

Any views or opinions represented in this blog are personal and belong solely to the blog owner and do not represent those of people, institutions or organizations that the owner may or may not be associated with in professional or personal capacity, unless explicitly stated.

Feel free to challenge me, disagree with me, or tell me I’m completely nuts in the comments section of each blog entry, but I reserve the right to delete any comment for any reason whatsoever (abusive, profane, rude, or anonymous comments) - so keep it polite.

The content of this website is protected by copyright. No portion of this website may be copied or replicated in any form without the written consent of the website owner.

Recent Comments !
  • Anvesh Patel { Sure will do... } – May 27, 12:43 PM
  • Anvesh Patel { Great... } – May 27, 12:41 PM
  • Anvesh Patel { Great... } – May 27, 12:39 PM
  • Anvesh Patel { Great... } – May 27, 12:36 PM
  • Anvesh Patel { Great... } – May 27, 12:28 PM
  • Anvesh Patel { Great... } – May 27, 12:27 PM
  • Anvesh Patel { Great... } – May 27, 12:16 PM
  • Older »
Follow Me !
  • facebook
  • linkedin
  • twitter
  • youtube
  • google
  • flickr
© 2015 – 2019 All rights reserved. Database Research & Development (dbrnd.com)
Posting....