Using the statement entry function

 

The statement entry function is the function that you first enter when selecting interactive SQL. You return to the statement entry function after processing each interactive SQL statement.

In the statement entry function, you type or prompt for the entire SQL statement and then submit it for processing by pressing the Enter key.

The statement you type on the command line can be one or more lines long. You can type bracketed comments (/* */) in interactive SQL. However, you should not use simple comments (that is, comments starting with --) in interactive SQL because these comments then include the remainder of the SQL statement within the comment. When the statement has been processed, the statement and the resulting message are moved upward on the display. You can then enter another statement.

If a statement is recognized by SQL but contains a syntax error, the statement and the resulting text message (syntax error) are moved upward on the display. In the input area, a copy of the statement is shown with the cursor positioned at the syntax error. You can place the cursor on the message and press F1=Help for more information about the error.

You can page through previous statements, commands, and messages. If you press F9=Retrieve with your cursor on the statement entry line, your previous statement is copied to the input area. Pressing F9 again causes it to scroll back one more statement and copy that to the input area. Continuing to press F9 allows you to scroll back through your previous statements until you find the one that you want. If you need more room to type an SQL statement, page down on the display.

 

Parent topic:

Using interactive SQL