Wednesday, 7 January 2015

How to Add Comments to SQL Statements

So far, you've been using very simple SQL statements to fetch the desired information from your DBMS. Once you become a guru, you start writing lengthy and complex statements to fulfill the needs of your application and ultimately your end user. Experienced coders usually add descriptive text to these complex statements for future reference. Such a text is known as comment, and is embedded before or within a SQL statement using two hyphens (--) or is entered within /* and */ character sets.

The first output below displays the use of embedded inline comments entered after two hyphens. The  second one, which is used to create multi-line comments to comment out code, is enclosed within /* and */ characters.


    Output :






















No comments:

Post a Comment