Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
7 views8 pages

DAY 3 SQL Server Lab1 - p5

The document outlines SQL commands for deleting data from a table using the DELETE statement and explains the difference between DELETE and TRUNCATE commands. It also describes the importance of MDF and LDF files in SQL Server, detailing their roles in storing database records and transaction logs. Additionally, it covers the processes of backing up and restoring databases in SQL Server.

Uploaded by

marwa.mah1956
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views8 pages

DAY 3 SQL Server Lab1 - p5

The document outlines SQL commands for deleting data from a table using the DELETE statement and explains the difference between DELETE and TRUNCATE commands. It also describes the importance of MDF and LDF files in SQL Server, detailing their roles in storing database records and transaction logs. Additionally, it covers the processes of backing up and restoring databases in SQL Server.

Uploaded by

marwa.mah1956
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Delete Query

• Syntax:
– DELETE FROM table_name
WHERE some_column=some_value;

• Example :
– DELETE FROM Customers
WHERE CustomerName=‘baabtra' AND
ContactName='Maria';
Truncate Query

• MDF stands for Main Database File and contains all the information in a database. LDF records all the transactions and
changes to the database.

Master Data file: MDF contains database record data


Log data file: Records information related to changes
made in the server as well as all the actions performed.
( stores changes related to CRUD Insert, Delete, and
Update.)

Truncate :delete all data in table (it can be DDL & DML)
DML - Examples
DML - Examples
DML - Examples
SQL Server – Creating Backups

•Backup is a copy of data/database, etc. Backing up


MS SQL Server database is essential for protecting
data.
SQL Server – Restoring Databases

Restoring is the process of copying data from a


backup and applying logged transactions to the data.

Restore is what you do with backups. Take the backup


file and turn it back into a database.

You might also like