MS SQLSERVER:Deleting A Database

378 views

Published on

MS SQLSERVER:Deleting A Database

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
378
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

MS SQLSERVER:Deleting A Database

  1. 1. 9<br />SQL SERVER: DELETINGA DATABASE<br />
  2. 2. DCL COMMANDS<br />WHAT IS DCL?<br />DATA<br />CONTROL<br />LANGUAGE<br />As the name suggests, DCL is used to control Data. It can be used to save or delete tables or rollback to an existing save point.<br />Save Point: It is a marker that represent a point of integrity in a database transaction. It is more like a backup or a restore point that we use in windows.<br />The Next slide illustrates the Save points concept better.<br />
  3. 3. Save Points<br />
  4. 4. Deleting tables<br />Dropping of tables:<br />Microsoft SQL Server 2008 provides yet another simple keyword for deleting the table. And that is the word ‘DROP’<br />drop table tablename;<br />The SQL Command drop deletes the table permanently and beyond recovery. Hence, it is advisable to reconsider deletion before performing it.<br />
  5. 5. Saving tables<br />Saving the existing work so that it can be resumed with later<br />Microsoft SQL Server 2008 commits to us in this matter by providing us with the keyword ‘COMMIT’<br />commit;<br />Caution:<br /> Once used, we cannot undo the changes made to the table previous to this command.<br />
  6. 6. Saving tables<br />Undo-ing the changes done to the table:<br />Microsoft SQL Server 2008 provides a solution with the simple keywords:<br />‘savepoint’ and ‘Rollback’<br />Create a Save point<br />savepointsavepointname;<br />Reverts the database state to the most recently created save point<br />rollback;<br />NOTE: You cannot rollback the DDL commands but only DML commands. So be cautious!!!<br />
  7. 7. Summary<br />9. Deletinga database<br /><ul><li> Save Points
  8. 8. Dropping tables
  9. 9. Creating Save points
  10. 10. Rolling back</li></li></ul><li>Visit more self help tutorials<br />Pick a tutorial of your choice and browse through it at your own pace.<br />The tutorials section is free, self-guiding and will not involve any additional support.<br />Visit us at www.dataminingtools.net<br />

×