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

How to get nth highest salary from employee table.

0 Answers  


How to edit table in sql server 2017?

0 Answers  


What is tcl in sql server?

0 Answers  


What is the template in sql?

0 Answers  


Stored Procedure returns data from multiple tables. How to access it in your ASP.Net code?

0 Answers   HCL,






What is a transaction and what are ACID properties?

3 Answers  


What is truncate table?

0 Answers  


Write an SQL query if u want to select the data from one block which intern reflects in another block ? thanx,do reply

1 Answers   Covansys,


What are transactions and its controls?

0 Answers  


What is log ldf?

0 Answers  


How to skip remaining statements in a loop block using continue statements?

0 Answers  


What are the extra roles available in msdb? : sql server security

0 Answers  


Categories