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

Differentiate between SQL and ORACLE joins and write their syntax.

0 Answers   Global Logic,


What is primary key, unique key, and foreign key?

0 Answers  


How many types of TRIGGERS are there in MS SQL Server?

8 Answers   CarrizalSoft Technologies, TCS, United Healthcare,


write coding for importing sql data into a word excel...

1 Answers   Oracle,


What is The Use Of TIMESTAMP DataType in SQL Server 2005?

6 Answers  






How to Display, Amount of Disk Activity Generated by Transact-SQL Statements?

1 Answers  


How to create a testing table with test data in ms sql server?

0 Answers  


How can a user-defined datatype be created?

0 Answers  


How to provide column names in insert statements in ms sql server?

0 Answers  


What is cursor ? And what is difference between Trigger ?

3 Answers   HCL, Polaris,


Which language is supported by sql server?

0 Answers  


What is the exact numeric data type in sql?

0 Answers  


Categories