+2 votes
in Class 12 by kratos

Write SQL query to create a table 'Inventory' with the following structure :

| Field | Type | Constraint |
| MaterialId | Integer | Primary key |
| Material | Varchar (50) | NOT NULL |
| Category | Char | |
| DatePurchas | Date | |

1 Answer

+3 votes
by kratos
 
Best answer

CREATE TABLE Inventory

(

MaterialId INTEGER PRIMARY KEY,

Material VARCHAR (50) NOT NULL,

Category CHAR,

DatePurchase DATE

);

...