IKH

DDL Statements: a Demonstration

In the first video of this segment, you will learn how to create and use a database (also known as a schema) in the MySQL Workbench. You will need to specify the database that you need to use. This is because even after creating a database, the MySQL Workbench does not select your newly created database automatically. The syntax for these operations is given below:

  • create database <database_name>
  • use <database_name>

So, you have now created a database. However, it holds no meaning without its constituent tables. Now, in the next video, you will learn about the create table command and create a table containing three columns along with their respective data types.

So, you now have a table ready at your disposal. Recall that every table should have a primary key to identify it uniquely. To fulfil this requirement, in the next video, you will learn how to use the alter table command for adding a primary key constraint to the table that you created in the previous video.

In this way, you have learnt about the DDL statements. In the next segment, you will have hands-on of DML statement.

Report an error