Knowee
Questions
Features
Study Tools

An emp table contains fields employ name, desig and salary. How do you drop column salary?Select one:a.alter table emp delete column salary;b.delete from emp where column = salary;c.alter table emp drop column salary;d.alter table emp delete salary;

Question

An emp table contains fields employ name, desig and salary. How do you drop column salary?Select one:a.alter table emp delete column salary;b.delete from emp where column = salary;c.alter table emp drop column salary;d.alter table emp delete salary;

🧐 Not the exact question you are looking for?Go ask a question

Solution

The correct answer is c. alter table emp drop column salary;

This is the correct SQL syntax to drop or delete a column from a table. The ALTER TABLE statement is used to add, delete/drop or modify columns in an existing table. It is also used to add and drop various constraints on an existing table.

Similar Questions

Which of the following options is not correct?Select one:a.alter table emp drop column column_name;b.alter table emp modify name varchar(30);c.alter table emp add column_name varchar(25);d.alter table emp drop column_name;

rect answerConsider a database table called "Employees" with the following columns:  EmployeeID (integer)  Name (text)  Age (integer)  Department (text)Sample data:What is the SQL query to delete the employee with EmployeeID 4 from the table?OptionsDELETE FROM Employees WHERE EmployeeID = 4;DELETE FROM Employees WHERE Name = 'Lisa Green';DELETE FROM Employees WHERE EmployeeID = '4';DELETE FROM Employees WHERE Department = 'Finance';

The command to remove rows from a table 'CUSTOMER' is:REMOVE FROM CUSTOMER ...DROP FROM CUSTOMER ...DELETE FROM CUSTOMER WHERE ...UPDATE FROM CUSTOMER ...

Which clause is used to delete table columns?Select one:a.DELETE TABLEb.DROP TABLEc.ALTER TABLEd.None of the answers are correcte.PURGE PURGE

Select the correct answerIn SQL, which statement is used to remove a table definition and its data from the database?OptionsDROP TABLEDELETE TABLEREMOVE TABLEERASE TABLEFinish ClearPrev Next

1/2

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.