MYSQL DATABASE INTERVIEW QUESTIONS

Course:MySQL
Chapter:Chapter 5 - DDL (Data Definition Language)
Questions Count:10
1

What is the purpose of the ALTER TABLE statement in MySQL?

Explanation:
2

How do you add a new column to an existing table using the ALTER TABLE statement?

Explanation:
3

How do you rename a column in an existing table using the ALTER TABLE statement?

Explanation:
4

How do you remove a column from an existing table using the ALTER TABLE statement?

Explanation:
5

How can you change the data type of a column in an existing table using the ALTER TABLE statement?

Explanation:
6

How do you add a primary key constraint to an existing table using the ALTER TABLE statement?

Explanation:
7

How do you add a foreign key constraint to an existing table using the ALTER TABLE statement?

Explanation:
8

How can you add an index to an existing table using the ALTER TABLE statement?

Explanation:
9

How do you change the default value of a column in an existing table using the ALTER TABLE statement?

Explanation:
10

Describe how to partition an existing table using the ALTER TABLE statement.

Explanation: