Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
9<br />SQL SERVER: DELETINGA DATABASE<br />
DCL COMMANDS<br />WHAT IS DCL?<br />DATA<br />CONTROL<br />LANGUAGE<br />As the name suggests, DCL is used to control Data...
Save Points<br />
Deleting tables<br />Dropping of tables:<br />Microsoft SQL Server 2008 provides yet another simple keyword for deleting t...
Saving tables<br />Saving the existing work so that it can be resumed with later<br />Microsoft SQL Server 2008 commits to...
Saving tables<br />Undo-ing the changes done to the table:<br />Microsoft SQL Server 2008 provides a solution with the sim...
Summary<br />9. Deletinga database<br /><ul><li> Save Points
 Dropping tables
Upcoming SlideShare
Loading in …5
×

MS SQL SERVER: Deleting A Database

480 views

Published on

MS SQL SERVER: Deleting A Database

Published in: Technology
  • Be the first to comment

  • Be the first to like this

MS SQL SERVER: 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 />

×