MYSQL DATABASE INTERVIEW QUESTIONS

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

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

Explanation:
2

How do you create a simple table with columns for an ID, name, and age?

Explanation:
3

What is a primary key, and how do you define it in the CREATE TABLE statement?

Explanation:
4

How do you create a table with a foreign key constraint in MySQL?

Explanation:
5

How can you specify default values for columns when creating a table?

Explanation:
6

How do you create a table with a unique constraint on a column?

Explanation:
7

How do you create a table with a composite primary key in MySQL?

Explanation:
8

How can you create a table with an auto-increment column and a foreign key constraint?

Explanation:
9

How do you create a table with a CHECK constraint in MySQL?

Explanation:
10

How do you create a partitioned table in MySQL, and what are its benefits?

Explanation: