SQL Assignment MBA I
SQL Assignment MBA I
Assignment 1
a. Write an SQL command that will create a table named TableOne with the following
fields and types: ENo int, FirstName VARCHAR(24), PAddress VARCHAR(30), Age
int , Giftvalue NUMERIC(10,2).
b. Insert the following items in the table you have created
DEPT CHAR(5)
EMPNAME VARCHAR(15)
PADDRESS VARCHAR(30)
SALARY NUMERIC(7)
Assignment 6: Alter
Create a table Student1 with the following structure:
Roll no number 3
Name varchar 20
Marks number 6
Write the following SQL queries
1. Add new columns pincode and city to Student1
2. Change the width of pincode to 6
3. Add a primary key
4. Add a not null constraint
5. Add construct check to the Marks column (Marks >=0 and Marks<=100)