You plan to run it once a month to keep track of how well each employee is doing. Suppose you have composed a query to display a list of salespeople and their commissions. Įxample 5-1 Using a System Editor to Write a SQL Script You can include multiple SQL commands and PL/SQL blocks in a script. You must include a semicolon at the end of each SQL command and a slash (/) on a line by itself after each PL/SQL block in the file. When you save the script with the text editor, it is saved back into the same file. SQL to the name unless you specify the file extension. To create a script with a text editor, enter EDIT followed by the name of the file to edit or create, for example:ĮDIT adds the filename extension. See SQL*Plus Configuration, and the DEFINE and EDIT commands for more information. You can include an editor definition in your user or site profile so that it is always enabled when you start SQL*Plus. For example, to define the editor used by EDIT to be vi, enter the following command: You can use the SQL*Plus DEFINE command to define the variable, _EDITOR, to hold the name of your preferred text editor. You can run your operating system's default text editor without leaving the SQL*Plus command-line by entering the EDIT command. Your operating system may have one or more text editors that you can use to write scripts.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |