<== Back
DDL (Data Definition Language)
Creating a Table
1. Type "use bank;"
2. Enter "create table people(
id int,
first_name varchar(20),
last_name varchar(20),
age int,
sex char
);"
It should return "Query OK" etc. You can check it by typing "show tables;"
Now to confirm that it created everything the way you wanted it:
3. Type "describe people;"
This will return what sort of table with what sort of columns you have created.
Deleting the Table
1. Type "drop table people;"
This will delete the table. You can type "show tables;" to confirm it.
<== Back