If we drop a table, does it also drop related objects like constraints, indexes, columns, defaults, views, and stored procedures?



If we drop a table, does it also drop related objects like constraints, indexes, columns, defaults, ..

Answer / anusha

No, dropping the table does not delete the corresponding table objects. Need to drop Indexes, views first before dropping the table.

eg:
drop view <database name>.<view name>
alter table <database name>.<table name> drop <index type>
drop table <database name>.<table name>

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

Is it possible to update the views? If yes, how, if not, why?

0 Answers  


What is mean by dml?

0 Answers  


What is the difference between a clustered index and a non-clustered index?

0 Answers  


difference between truncate, delete aur drop?

2 Answers  


What is used to replicate sessions between instances in coldfusion clusters?

0 Answers   HCL,






How to override dml statements with triggers?

0 Answers  


Can we create clustered index on non primary key column

20 Answers   ABC, CTS,


Is INSTEAD OF trigger directly applicable to Table ?

0 Answers  


Difference between Function and Stored Procedure?

9 Answers   C1 India, NA,


Mention the 3 ways to get a count of the number of records in a table.

0 Answers  


what are the joins,primary key,foriegn key, candidate key, super key and expain them?

6 Answers   Polaris,


How many types of local tables are there in sql server?

0 Answers  


Categories