0% found this document useful (0 votes)
27 views5 pages

Experiment

Uploaded by

Varun Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views5 pages

Experiment

Uploaded by

Varun Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Experiment-2

DDL Command Exercise

Location Table

1. Write a MySql statement to create a simple table location as shown above

ANS:-

2. Write a MySql statement to create a simple table countries as shown above.

ANS:-

3. Write a MySql statement to create a simple table Job as shown above


ANS:-

4. Write a MySql statement to create a simple table Job_History as shown above

5. Write a MySql statement to rename the table countries to country_new.

6. Write a MySql statement to add a column region_id to the table locations.


7. Write a MySql statement to add a columns ID as the first column of the table

locations.

8. Write a MySql statement to add a column region_id after state_province to

the table locations.


9. Write a MySql statement change the data type of the column country_id to

integer in the table locations.

10. Write a MySql statement to drop the column city from the table locations.

11. Write a MySql statement to change the name of the column state_province to
state, keeping the data type and size same.

12. Write a MySql statement to drop table Job_History.

13. Write a MySql statement to truncate table Job_History.

You might also like