1 PRINT Displays a message in interactive SQL. 2 Environment You can use the PRINT statement in interactive SQL. 2 Format PRINT -+-+-> --+--+--------------------------------------+-+--> | +-> -+ +-> AS -+----------------------++ | | +-> edit-using-clause -+ | +------------------------ , <---------------------------------+ edit-using-clause = --> EDIT USING -+-> edit-string ---+-> +-> -+ 2 Arguments 3 AS_name Changes the name displayed in the print statement header. By default literal values have a blank header name and variables use their name as a header. If the header must include spaces or lowercase characters then use SET QUOTING RULES or SET DIALECT to enable delimited identifiers 3 EDIT_USING Syntax options: EDIT USING edit-string|EDIT USING domain-name Assigns an edit string for use when formatting the variable or literal value. If a domain name is specified then the EDIT STRING from the domain is used. This clause is only permitted for interactive SQL. 3 literal Specifies the values you want displayed to the user during execution of the command procedure. Enclose the character literals in single quotation marks. 3 variable Prints the contents of the specified variable. 2 Examples Example 1: Displaying a literal from a command procedure The following PRINT statement in a command procedure displays 'Creating trigger definitions for the database' during the execution of the command procedure: SQL> -- Trigger definition statements are next. SQL> PRINT 'Creating trigger definitions for the database'; SQL> CREATE TRIGGER EMPLOYEE_ID_CASCADE_DELETE . . . Example 2: Displaying a variable The following PRINT statement displays the definition of a variable: SQL> DECLARE :X CHAR(10); SQL> BEGIN cont> SET :X = 'Active'; cont> END; SQL> PRINT :X; X Active