How to comment in Postgres SQL?

To create a single line comment in PostgresSQL, you use two hashes --

For example:

-- This is a comment. 

and if you want multi-line comment, then you use /*  */

For example 

/*

This is a multi-line

comment

which won't be read by

SQL interpretor 

*/

 

Checkout more Postgres SQL Tutorials here.

Leave a comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.