- Creating Database
Query OK, 1 row affected (0.00 sec)
- Show list of all the databases.
- Accessing or using a particular database.
Database changed
- Creating table.
Here table has 4 fields id (numeric field) , first_name (character type field) , last_name (character type field), email (character type field), country (character type field).
- Listing all the tables in the database.
- You can view the columns you have created in the table “dexter” as:
- We will add a column say ‘last_name‘ after column ‘first_name‘.
Query OK, 0 rows affected (0.27 sec)
Records: 0 Duplicates: 0 Warnings: 0
- Inserting a row in the table.
- listing all the entries in a table we use * for all.
- Deleting a row using the id field here id field is numeric.
- deleting a row using the field which has character value, for character we have to use ' '.
Query OK, 1 row affected (0.02 sec)
- Updating a field in the table
- Deleting a column from the table.
- Deleting an existing table. mysql> drop table dexter;
- Renaming an existing table.
Query OK, 0 rows affected (0.04 sec)