16.4 Practical Exercises
Exercise 1: Creating, Altering, and Dropping Tables
- Create a table named 'Customers' with the following fields: 'ID' (integer), 'Name' (text), and 'Email' (text).
- Add a column 'PhoneNumber' to the 'Customers' table.
- Change the data type of the 'PhoneNumber' column to integer.
- Drop the 'Customers' table.
Exercise 2: Database Backups and Recovery
- Backup your database into a .sql file.
- Restore your database from a .sql file.
Note: The commands for this exercise are not standard SQL and will depend on the SQL database system you are using. Please refer to your database system's documentation for the correct syntax.
Exercise 3: Security and Permission Management
- Create a new user 'test_user' with the password 'test_password'.
- Grant 'test_user' all privileges on the 'Customers' table.
- Revoke all privileges from 'test_user...