This displays a pane for more table options. (Librarian's personal rating of the book, from 1 (poor) to 10 (great))Īfter you have entered the last column (rating), check Advanced (next to Schema).
This is the Dewey code or other book identifier.) Primary Key (Automatically checks Not Null an index is also created on the primary key column. (If you accidentally click OK instead of Add Column, right-click the BOOKS table in the Connections navigator display, select Edit, and continue to add columns.) After creating each column except the last one (rating), click Add Column to add the next column. Schema: Specify your current schema as the schema in which to create the table.Ĭreate the table columns using the following information. Be sure that the Advanced box is not checked when you start creating the table.)įor detailed information about the table dialog box and its tabs, see Section 5.53, "Create Table (quick creation)" and Section 5.54, "Create/Edit Table (with advanced options)". (If a tab or field is not mentioned, do not enter anything for it. Right-click the Tables node in the schema hierarchy on the left side, select New Table, and enter the following information. To create the BOOKS table, connect to the database as the user in the schema you want to use for this tutorial. You will use the Create Table dialog box to create the table declaratively the table that you create will be essentially the same as if you had entered the following statement using the SQL Worksheet:ĬONSTRAINT books_pk PRIMARY KEY (book_id),ĬONSTRAINT rating_1_to_10 CHECK (rating IS NULL ORĬONSTRAINT author_title_unique UNIQUE (author_last_name, title))
It includes columns of character and number types, a primary key, a unique constraint, and a check constraint.
The BOOKS table contains a row for each book in the library.