In this fourth part of a seven-part series on Oracle SQL Developer, you'll learn how to edit column definitions, and how to use SQL Developer to run SQL statements. This article is excerpted from chapter two of the book Murach's Oracle SQL and PL/SQL, written by Joel Murach (Murach; ISBN: 1890774502).
How to edit the column definitions
If you want to edit a column definition, you can use one of the techniques described in figure 2-7 to display the Edit Table dialog box. Then, you can use this dialog box to add a column, delete a column, or modify a column.
If you want to display additional information about a column, you can select the column by clicking on it. Then, additional properties are displayed in the Column Properties group that’s displayed on the right side of the dialog box. In this figure, for example, the properties for the DefaultTermsID column are displayed. In addition, a default value of 3 has been entered for this column. Note that the properties that are available change depending on the data type of the column. For a column with the VARCHAR2 data type, for example, the properties also indicate the length of the column. You’ll learn more about that in chapter 8.
Most of the time, you won’t want to use SQL Developer to edit the column definitions for a table. Instead, you’ll want to edit the scripts that create the database so you can easily recreate the database later. However, if necessary, you can use SQL Developer to edit the column definitions for a table. In chapter 10, you’ll learn more about creating and modifying the column definitions for a table.
How to edit the column definition of a table
Description
To edit the definition of a table, right-click on the table name, select the Edit command, and use the Edit Table dialog box to modify the table.
You can use the Edit Table dialog box to add a column, delete a column, or change the properties of an existing column such as the name, data type, default value, and so on.
You can also use the Edit Table dialog box to add, delete, or modify a table-level constraint, an index, or a table-level comment.
For more information about creating tables, see chapter 10.
---------------------------------------Figure 2-7 How to edit the column definitions