12.07.2015 Views

Oracle SQL Developer

Oracle SQL Developer

Oracle SQL Developer

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Create/Edit Table (with advanced options)column up or down in the primary key definition, select it in Selected Columns anduse the arrow keys.The remaining fields (Populate Primary Key Column through Trigger Name) appearonly when you are creating a table. They are not available when you are editing anexisting table.Populate Primary Key Column: When you are creating a table, if you want to use atrigger and a sequence to have a unique value automatically inserted into the primarykey column when you insert a new row, specify the primary key column.From: An existing sequence that you select, or a new sequence whose name you enter.(For a new sequence, <strong>SQL</strong> <strong>Developer</strong> creates the sequence automatically using thename that you enter.)Trigger Name: The name for the before-insert trigger that will be automaticallycreated. This trigger uses the sequence to generate a new value for the primary keywhen a row is inserted. For an example of using this technique, see the tutorial sectionCreating a Table (Transactions).Unique Constraints tabSpecifies one or more unique constraints for the table. A unique constraint specifies acolumn, or set of columns, whose data values must be unique: each data value mustnot be null, and it must not be the same as any other value in the column.For a multicolumn unique constraint, the combination of values must be unique, andno column in the constraint definition can have a null value. For example, if youspecify the office_name and city columns for a unique constraint, you could not havetwo Sales offices in Chicago, but you could have a Sales office in Chicago and a Salesoffice in Atlanta.Unique Constraints: Lists the unique constraints currently defined on the table. Toadd a unique constraint, click the Add button; to delete a unique constraint, select itand click the Remove button.Note: After you add a unique constraint, to add another uniqueconstraint, click the Add button.Name: Name of the unique constraint. Must be unique within the database.Enabled: If this option is checked, the unique constraint is enforced.Available Columns: Lists the columns that are available to be added to the uniqueconstraint definition.Selected Columns: Lists the columns that are included in the unique constraintdefinition.To add a column to the unique constraint definition, select it in Available Columns andclick the Add (>) icon; to remove a column from the unique constraint definition,select it in Selected Columns and click the Remove (>) or Remove All (

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!