In theory, all of your T-SQL statements are supposed to end with a semicolon, like this:
SELECT * FROM dbo.Posts;
SELECT * FROM dbo.Comments;
Why? Well, SQL Server 2005’s Books Online says:
Many code examples use a semicolon (;) as a Transact-SQL statement terminator. Although the semicolon is not required, using it is considered a good practice.
You know, like flossing your teeth, and puff-puff-give. But SQL Server 2008 marked a change:
Although the semicolon is not required for most statements in this version of SQL Server, it will be required in a future version.
Whoa. When exactly is “a future version?” The current BOL page for T-SQL syntax conventions still has 2008’s vague language, so at least Microsoft has given us a heck of a long grace period to get our act together.
The gambler in me doubts that Microsoft will ever be able to enforce this rule. A ton of legacy T-SQL code would suddenly start failing, which means businesses just wouldn’t adopt a new version of SQL Server (or Azure SQL DB) that included this rule. However, the DBA in me isn’t a gambler, so when I write new code, I try to end every statement with a semicolon.