save this Creating Table Structures Use one line per column

save this Creating Table Structures . Use one line per column (attribute) definition . Use spaces to line up attribute characteristics and constraints Features of table creating command sequence NOT NULL specification UNIQUE specification . Syntax to create table CREATE TABLE tablename0: CREATE TABLE COMPANY-DATABASE INVOICES INVOICE ID INT NOT NULL NWOICE PRODUCT DESCRIPTION VARCHAR(45) NOT MOLL DEPAULT \'A very good product\', PRIMARY KEY INVOICE TD), UNEQUE INDEX IWOICE PRODUCT DESCRIPTION UNTQUE INVOICE PRODUCT DESCREPTION ASC))j

Solution

CREATE TABLE \'SALES\'.\'INVOICES\'{
\'INV_NUMBER\' INT NOT NULL,
\'INVOICE_PRODUCT_DESCRIPTION\' VARACHAR(10),
\'INV_DATE\' DATE,
PRIMARY KEY (\'INV_NUMBER\')
};

---------------------------------------------------------------------

CREATE TABLE \'SALES\'.\'INVOICES\' : Create command to create a table and specifying the table name INVOICES ans the database SALES

\'INV_NUMBER\' INT NOT NULL : Specifying an attribute INV_NUMBER and it\'s type as integer. Making sure that the value shouldn\'t be null

\'INVOICE_PRODUCT_DESCRIPTION\' VARACHAR(10) : Attribute with type varchar of length 10

\'INV_DATE\' DATE : Attribute of type date

PRIMARY KEY (\'INV_NUMBER\') : Specifying a constraint that the INV_NUMBER is primary key which means unique and not null value that recognizes rows uniquely in the table

 save this Creating Table Structures . Use one line per column (attribute) definition . Use spaces to line up attribute characteristics and constraints Features

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site