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 the difference between push and pull subscription? : sql server replication

0 Answers  


List all the types of user-defined functions?

0 Answers  


i have account table which consists of account name,card no and card no consists 16 digits now i want to retrieve the data if card no starts from 4 then it should print visa and if it starts from 5 then it should print master so plse help me to write simple query with out store procs .

3 Answers  


between cast and convert which function would you prefer and why?

0 Answers  


What is log ldf?

0 Answers  






what happens on checkpoint? : Sql server database administration

0 Answers  


how to take backup bcp out for a column in table in sql server?

0 Answers  


what is diffence between replicaion and logshipping?

1 Answers  


How do I make a resultset scrollable?

0 Answers  


What are indexes? When do you need to create Indexes?

4 Answers   CarrizalSoft Technologies, HP,


What is the difference between clustered and non-clustered indexes in ms sql server?

0 Answers  


how many joins we can write if at all we have n no of tables

5 Answers   Tanla Solutions, TS,


Categories