SQL Comments

SQL Comments

In SQL, comments are used to add explanatory notes or remarks within the SQL code. Comments are ignored by the database engine and are meant for developers and administrators to document and clarify the purpose or functionality of the code. There are two types of comments commonly used in SQL:

  1. Single-line comments: Single-line comments begin with two consecutive hyphens (–). Anything written after the double hyphens is considered a comment and is ignored by the database engine. For example:
sql
SELECT * FROM customers; -- This is a comment
  1. Multi-line comments: Multi-line comments are used to add comments that span across multiple lines. They start with /* and end with */. Any text between these delimiters is treated as a comment. For example:
sql
/*
This is a multi-line comment
that can span across multiple lines.
*/
SELECT * FROM orders;

It’s good practice to use comments in your SQL code to make it more understandable and maintainable, especially when working on complex queries or stored procedures. Comments can provide context, explain the purpose of certain sections, or indicate important details for future reference.

Leave a Reply

Your email address will not be published. Required fields are marked *

GLOTRU Footer
Popular Features
Popular Services/

Website Development & Design

App Development & Design

Graphic Design

Digital Marketing

SEO (Search Engine Optimization)

SMM (Social Media Marketing)

Cyber Security

Company

GLOTRU Founder & CEO : __Azam

Registared : Trade,MSME,etc

Board of Director

Team

About Us

Contact Us

Privacy Policy

Return & Refund Policy

Abuse Policy

Copyright Policy

Cookie Policy

Terms & Conditions

Universal Terms of Service

Disclaimer

Legal

Sponsorships

Investor

Press Releases

Our Investments

Brands

Newsroom

Business

...

_

Digital Millennium Copyright Act
DMCA.com Protection Status

_

Content similarity detection
Protected by Copyscape

_

***ANTI-PIRACY WARNING***

...................................................................................

Follow Us :

...................................................................................

SECURE SERVER : [Legal] [Privacy Policy] [Universal Terms of Service] [Do not sell my personal information]

SITE HOSTED : GLOTRU SECURE SERVER Asian Data Centre [You can host your site][Click Here]

SSL : Server Type : [Cloudflare] Certificate Issued By : [Let's Encrypt] Signature Algorithm : [ECDSA with SHA-384]

SITE BUILD SOFTWARE : Content Management System (CMS) Softwere

_

_

_