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

Differences between functions and stored procedures?

8 Answers   247Customer, Accenture,


How to truncate a table first before running a package?

1 Answers  


Write down the syntax and an example for create, rename and delete index?

0 Answers  


what is the signification difference of this bit data type between sql 6.5 and later version sql server?

1 Answers  


What the different topologies in which replication can be configured?

0 Answers  






What is the use of keyword with encryption. Create a store procedure with encryption?

0 Answers  


What is the system function to get the current user's user id?

2 Answers   HCL,


Explain left outer join and right outer join?

0 Answers  


What is repeatable read?

0 Answers  


What is filtered index?

0 Answers  


What is sql server schema compare? How we can compare two database schemas?

0 Answers  


What is scheduled job and how to create it?

0 Answers  


Categories