Delete operation in SQL Server 2008

In this article I am going to explain about how to implement Delete operation in SQL Server
  • 1720

Delete operation:

In this article I am going to explain about how to implement Delete operation in SQL Server. It is possible to Removed  of all rows in a table and Removed of specific row from the table.

The delete command delete row from the table.

  1. Removed of all rows from the table.
  2. Removed of specific row.

 1. Removed of all rows from the table.

It is possible to delete all rows in a table without deleting the table. This means that the table structure, attributes, and indexes will be intact:

Example:
 

We create one table named aaa in the SQL database which looks as in the following image.

Create_Table.jpg
 

  To delete all rows from aaa table without deleting the table, type following code.

detete_records.jpg

4 row deleted from table named aaa .

2 . Removed of specific row.

It is possible to delete specific one rows in a table without deleting the table.

 We create one table named aaa in the SQL database which looks as in the following image.

Create_Table.jpg


  To delete 1 row deleted  from table named aaa.

delete 3.jpg

1 row deleted from table named aaa .


Categories

More Articles

© 2013 dotNetheaven. All rights reserved.