; in MSSQL

Raguram Manokaran 90 Reputation points
2023-06-12T05:27:30.4933333+00:00

"When I give only a semicolon (;) in a query, I am getting the message 'Commands completed successfully.' Are there any other symbols that can give the same result?"User's image

Azure SQL Database
Azure SQL Edge
Azure SQL Edge
An Azure service that provides a small-footprint, edge-optimized data engine with built-in artificial intelligence. Previously known as Azure SQL Database Edge.
48 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,354 questions
0 comments No comments
{count} votes

Accepted answer
  1. Olaf Helper 43,246 Reputation points
    2023-06-12T05:45:42.37+00:00

    Are there any other symbols that can give the same result?"

    What for a strange question.

    The semikolon is a command terminator; your "command" is empty.

    You can use any "non-doing command" to get the same result, like a comment character

    --
    

    or

    /* */
    
    3 people found this answer helpful.

3 additional answers

Sort by: Most helpful
  1. LiHongMSFT-4306 25,651 Reputation points
    2023-06-12T05:39:39.7866667+00:00

    Hi @Raguram Manokaran

    The semicolon (;) is used in SQL code as a statement terminator.

    See this article for more details: SQL Statements Where Semicolon is Required.

    Are there any other symbols that can give the same result?"

    Maybe single word 'GO'.

    GO signals the end of a batch of Transact-SQL statements to the SQL Server utilities.

    See: SQL Server Utilities Statements - GO

    Best regards,

    Cosmog Hong


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our Documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

  2. Raguram Manokaran 90 Reputation points
    2023-06-13T04:29:54.9533333+00:00

    Hi Team,

    "My above query is for SQL, and it has been resolved. However, we are now using a storage account, container, and files with some tags, and we have developed a custom API to retrieve the tag details. I would like to know if there are any scenarios where a storage account returns a success message similar to SQL."

    User's image

    0 comments No comments

  3. Raksha Chourasia 75 Reputation points
    2023-06-13T07:04:40.9533333+00:00

    You can use 2 more similar semicolons:

    1. Double Dash (--): The double dash is used to begin a single-line comment in SQL. When you enter a statement that starts with a double dash, the entire line is treated as a comment, and the database engine will ignore it.
       -- This is a comment
      

    Slash Asterisk (/* /): The slash asterisk symbols are used to begin and end a multi-line comment in SQL. When you enclose a statement between / and */, the entire block is considered a comment and will not be executed.

    /* This is a multi-line comment */

    0 comments No comments