Writing SQL Statements

Every SQL document contains the Text view with SQL editor in it. You switch to this view to edit your SQL queries.

When you type text in SQL editor, it automatically recognizes and highlights SQL syntax.

For ease of SQL writing and reviewing, you can also use such supported shortcut keys as: CTRL+PLUS (+) KEY (to zoom the query in), CTRL+MINUS (-) KEY (to zoom the query out), CTRL+0 (to return an SQL document to the one-to-one scale).

You write and execute SQL queries not only one at a time but you may as well compose SQL scripts. SQL scripts consist of multiple SQL statements separated by the appropriate statement delimiter.

Working with comments

When writing SQL code, it is essential to include comments to enhance its readability and understandability for other developers who might need to work with it later.

Comment out the selected lines

To leave a comment in the SQL document:

  1. Select the lines you would like to comment out.
  2. On the Text Editor toolbar, click the Comment out the selected lines button or press Ctrl+K, C.

Customize TODO comments

Colorize the TODO comments, making them visually distinct from regular ones. In order to customize these comments:

  1. Go to the Tools menu and select Options.
  2. In the Options window, expand the Environment category.
  3. Select Fonts and Colors.
  4. Set the desired font, size, and color for the TODO comments.
  5. Click OK once done.

TODO comments customization

Uncomment the selected lines

To remove comment characters from the SQL document:

  1. Select the lines you would like to remove the comment from.
  2. On the Text Editor toolbar, click the Uncomment the selected lines button or press Ctrl+K, U.

Want to Find out More?

Overview

Overview

Take a quick tour to learn all about the key benefits delivered by dbForge Studio for Oracle.
All Features

All features

Get acquainted with the rich features and capabilities of the Studio in less than 5 minutes.
Request a demo

Request a demo

If you consider employing the Studio for your business, request a demo to see it in action.
Ready to start using dbForge Studio for Oracle?