0% found this document useful (0 votes)
9 views

Lesson_2

The document provides an overview of basic SQL commands related to DVD sales transactions, including Select, Insert, and Update commands. It explains how to retrieve specific columns from a table, add new records, and modify existing entries. Additionally, it mentions the use of the Explain command to analyze query performance metrics.

Uploaded by

ngrsuley
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Lesson_2

The document provides an overview of basic SQL commands related to DVD sales transactions, including Select, Insert, and Update commands. It explains how to retrieve specific columns from a table, add new records, and modify existing entries. Additionally, it mentions the use of the Explain command to analyze query performance metrics.

Uploaded by

ngrsuley
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 7

DVD sales

Entity Entity

Customers City

Entity

Country
Server instance

Server Instance
DDL AND DCL COMMANDS
Select Command
Transactions
Sales_id Price Store_name

Select * from
* Is called star

When we use start that means we want all the columns and all the rows from the table

Select Sales_id, Price from transactions – This query will bring ONLY
Specified columns from the sales table.
Insert command
Sales_id Price Store_name
1 15 Oba Market

Insert into transactions (Sales_id,Price,Store_name) values(1,15,’Oba Market’)


Update command
Sales_id Price Store_name
1 15 Oba
Market/Bazarstore

Update transactions Set Store_name = ‘Bazarstore’ Where Sales_id = 1

Update is used to change or update value of the table


Explain Analyze
Explain helps us to get the logical query plan of our
operation. For example from below we can measure
planning time, execution time and other metrics.

You might also like