How to delete an attribute from the emp table

Answers were Sorted based on User's Feedback



How to delete an attribute from the emp table..

Answer / sonia

Using the DROP COMMAND-
See the eg below--

create table stup(roll int,name varchar,marks int)
insert into stup values(1,'A',10)
insert into stup values(2,'B',20)
select * from stup
Alter table stup drop column marks
select * from stup

Is This Answer Correct ?    9 Yes 2 No

How to delete an attribute from the emp table..

Answer / swetha

we can directly ALTER OR DROP the column AND THEN COMMIT ON
IT SO THAT IT GETS MODIFIED

Is This Answer Correct ?    5 Yes 0 No

How to delete an attribute from the emp table..

Answer / amit srivastava

create table stup(roll int,name varchar,marks int)
select * from stup
Alter table stup drop column marks
select * from stup

Is This Answer Correct ?    1 Yes 0 No

How to delete an attribute from the emp table..

Answer / ram murthy

we can delete an attribute through delete command.

Is This Answer Correct ?    1 Yes 8 No

Post New Answer

More SQL Server Interview Questions

What is difference between index seek vs. Index scan?

0 Answers  


Explain about extended stored procedure?

0 Answers  


what is IDE,DMV in sql server?

1 Answers   Value Labs,


How to replace the Query Result 'Null Value' with a text ?

0 Answers   MCN Solutions,


How to define the name and server for a new dsn?

0 Answers  


How do I run a trace in sql server?

0 Answers  


Define outer join in sql server joins?

0 Answers  


When would you use an insert into .. Select option versus an insert into .. Values option? Give an example of each?

0 Answers  


How to loop through result set objects using odbc_fetch_row()?

0 Answers  


How do I open port 1433?

0 Answers  


Can we call stored procedure in view in sql server?

0 Answers  


How to delete duplicate rows in sql server?

0 Answers  


Categories