Specifies the editor used by the EDIT command.Ĭurrent version of the installed Oracle Database.įull release number of the installed Oracle Database. Table 12-3 Variables Predefined at SQL*Plus Installation Variable NameĬonnection identifier used to make connection, where available.Ĭurrent date, or a user defined fixed string. To list the definition of DEPARTMENT_ID, enter DEFINE DEPARTMENT_ID To assign the CHAR value 20 to the variable DEPARTMENT_ID, type: DEFINE DEPARTMENT_ID = 20Įven though you enter the number 20, SQL*Plus assigns a CHAR value to DEPARTMENT_ID consisting of two characters, 2 and 0. If you execute a command containing a reference to &POS, SQL*Plus substitutes the value MANAGER for &POS and will not prompt you for a POS value. To assign the value MANAGER to the variable POS, type: DEFINE POS = MANAGER Some variables are predefined when SQL*Plus starts. If a value supplied for a defined variable matches a variable name, then the contents of the matching variable are used instead of the supplied value. You should avoid defining variables with names that may be identical to values that you will pass to them, as unexpected results can occur. For example, SQL*Plus interprets DEFINE TEXT = 'ONE. If the value of a defined variable extends over multiple lines (using the SQL*Plus command continuation character), SQL*Plus replaces each continuation character and carriage return with a space. SQL*Plus will not prompt you for the value of variable in this session until you UNDEFINE variable. Whenever you run a stored query or script, SQL*Plus substitutes the value of variable for each substitution variable referencing variable (in the form & variable or & variable). Reference the variable in the NEW_VALUE or OLD_VALUE clause of a COLUMN command and then reference the column in a SELECT command Enter DEFINE with no clauses to list the values and types of all substitution variables.ĭefined variables retain their values until you:Įnter a new DEFINE command referencing the variableĮnter an UNDEFINE command referencing the variableĮnter an ACCEPT command referencing the variable Enclose text in single quotes if it contains punctuation or blanks.ĭefines (names) a substitution variable and assigns it a CHAR value.Įnter DEFINE followed by variable to list the value and type of variable. Represents the CHAR value you wish to assign to variable. Represents the user or predefined variable whose value you wish to assign or list. Specifies a user or predefined variable and assigns a CHAR value to it, or lists the value and variable type of a single variable or all variables.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |