Database Practice Manual
Database Practice Manual
Database Practice Manual
NO DATE SIGNATURE
5
6
CP4152:DATABASEPRACTICESEXPERIMENT
Ex.no:1
Create table using data definition language ,create alter, drop, enforce a
foreign key ,primary key ,check, not null constraints and creating views
AIM : Creating Tables and altering the Tables Procedure:
Mysql>Create table passenger2(passportId Integer Primary
Key,Name varchar(10) NotNull,Age Integer Not Null,Sex
char,Address varchar(20) Not Null);
Mysql> desc
Passenger2;
USING ALTER COMMAND
Adding Extracolumn to
Existing table
Mysql>Alter Table passenger3 Modify column Name varchar(20);