Your SlideShare is downloading. ×
MS Sql Server: Deleting A Database
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

MS Sql Server: Deleting A Database

891

Published on

Deleting A Database

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
891
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

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

×