retagged by
544 views
7 votes
7 votes

Consider the table ‘employee’ having two columns: 'EmpNo' and 'EmpName'.

Run the following transaction on the table:

COMMIT;
ALTER TABLE employee
ADD PhoneNo varchar(10);
ROLLBACK;

What are the columns in the table after the above operation?

  1. EmpNo  PhoneNo  
  2. EmpNo  EmpName
  3. Same as (B) but will throw an error indicating failed transaction
  4. EmpNo  EmpName  PhoneNo
retagged by

1 Answer

Best answer
17 votes
17 votes
Answer D

Reason:-

You cannot rollback a DDL operation like ALTER TABLE because DDL is implicitly committed.
selected by
Answer:

Related questions

3 votes
3 votes
1 answer
4
Bikram asked Aug 26, 2017
408 views
What is the number of rows returned by an SQL query on the below EMP table?$\begin{array}{|c|c|c|} \hline \text{eno} & \text{ename} & \text{manager} \\ \hline 1 & A & \te...