Introduction
We use DROP TABLE to remove a whole table and its data. ALTER TABLE lets us change a table's structure without deleting it.
DROP TABLE table_name; ALTER TABLE table_name ADD column_name datatype; ALTER TABLE table_name DROP COLUMN column_name; ALTER TABLE table_name RENAME TO new_table_name; ALTER TABLE table_name RENAME COLUMN old_column_name TO new_column_name;
DROP TABLE employees;
ALTER TABLE employees ADD birthdate DATE;
ALTER TABLE employees DROP COLUMN birthdate;
ALTER TABLE employees RENAME TO staff;
CREATE TABLE students ( id INT, name VARCHAR(50) ); ALTER TABLE students ADD age INT; ALTER TABLE students RENAME COLUMN name TO full_name; SELECT * FROM students;
DROP TABLE do?age of type INTEGER to a table called users?employees with columns id, name, and salary, what will be the result of this SQL command?ALTER TABLE employees DROP COLUMN salary;
salary column will be removed from the employees table. correctly describes removing the salary column; others describe deleting data or table, or adding columns.ALTER TABLE customers DROP age;
fullname to name in the table students. Which SQL command correctly does this in a standard way?Pass the test and this pattern moves unknown