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

MindMapofStructuredQueryLanguageSQL

Uploaded by

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

MindMapofStructuredQueryLanguageSQL

Uploaded by

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

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/383211934

Mind Map of Structured Query Language (SQL)

Presentation · August 2024


DOI: 10.13140/RG.2.2.32841.15200

CITATIONS READS

0 74

1 author:

Ala'a M. Al-Momani
Universiti Sains Malaysia
100 PUBLICATIONS 94 CITATIONS

SEE PROFILE

All content following this page was uploaded by Ala'a M. Al-Momani on 18 August 2024.

The user has requested enhancement of the downloaded file.


SELECT CustomerID, ContactName, Country FROM Customers; SELECT CustomerID, ContactName, City FROM Customers
SELECT * FROM Customers; Where City = "London";

SELECT: This keyword initiates a query and tells the database that you're
going to specify which columns you want to retrieve. In this case, using *,
which is a wildcard character that means "all columns.

FROM: This keyword specifies which table to pull data from. Here, it's telling
the SQL engine to look in the table named Customers.

Customers: This is the name of the table from which the data will be
retrieved.

SQL Statement
Retrieve Specific Where 3
Columns
1 2 Clause
SELECT * FROM Products here Price > 30 AND SupplierID = 11 SELECT * FROM Products Where Price <25;
Order by Price;

"ORDER BY"
Clause
Less
8 4 than

"ORDER BY"
6 5
Greater
7 Clause “AND”
than
Operator

SELECT * FROM Products here Price > 30 AND SupplierID = 11 SELECT * FROM Products Where Price >25 AND SupplierID = 3; SELECT * FROM Products Where Price >25;
Order by Price DESC;
SELECT * FROM Products SELECT * FROM Products SELECT * FROM Products
WHERE ProductName = 'Chang' OR 'Chais'; WHERE ProductName IN ('Chais','Chang','Konbu'); WHERE Price BETWEEN 20 AND 30;

“OR” “IN”
“BETWEEN”
3
1 Operator Operator
2 Operator
SELECT Country, Count(*) as "No of records" FROM Customers SELECT Count(*) FROM Customers;
Group By Country Order by 2;

ALIAS
Record
8 4

"ORDER BY" 6 5
&
7 "Group By"
"Group By"
Clause “MAX”

SELECT Country, Count(*) FROM Customers SELECT Country, Count(*) FROM Customers SELECT MAX(Price) FROM Products;
Group By Country Order by 2; Group By Country;
https://www.mysql.com/downloads/

Download Download 3
1 SQL
Download
SQL 2 SQL

Text
Area
8 4

Information 6 5
about Tables
7 Tables Schemas
SQL Commands SQL Commands
2- DDL (Data Definition Language)
1- DQL (Data Query Language)
❑ Purpose: Used to define and modify the structure of database objects like tables,
❑ Purpose: Used to query the database and retrieve data.
schemas, indexes, and database links.
❑ Key Command: ❑ Key Command:
✓ CREATE: To create new database objects.
SELECT: This is the primary command used in DQL to query data from the
✓ ALTER: To modify existing database objects.
database. It can be combined with various clauses like WHERE, GROUP BY, ✓ DROP: To delete database objects.
✓ TRUNCATE: To remove all records from a table, including all spaces allocated
HAVING, and ORDER BY to filter, group, and order the data accordingly.
for the records are removed.

Create a SQL SQL 3


1 Commands
Table Commands 2
SQL Commands
3- DML (Data Manipulation Language)

❑ Purpose: Used to insert, update, delete, and manipulate data in the database.

❑ Key Command:
“LIMIT”
8 4 ❖ INSERT: To add new rows to a table.

❖ UPDATE: To modify existing data.

❖ DELETE: To remove data from a table.


6 5
“SELECT”
7 SQL
Commands

SQL Commands SQL Commands


5- TCL (Transaction Control Language)
4- DCL (Data Control Language)
❑ Purpose: Used to manage the changes made by DML statements, providing a
way to handle transactions within a database. ❑ Purpose: Used to define access permissions and security levels.

❑ Key Command: ❑ Key Command:


❖ COMMIT: To save all changes made during the current transaction.
❖ ROLLBACK: To revert changes since the last COMMIT. ❖ GRANT: To provide a user with access privileges to the database.
❖ SAVEPOINT: To create points within groups of transactions in which to
ROLLBACK. ❖ REVOKE: To remove access privileges provided by the GRANT command.
❖ SET TRANSACTION: To specify characteristics for the transaction.
“ROUND” 3
1 “DISTINCT”
2

UPPER
8 4

6 5
RAND
7 ABS
LENGTH 3
1 LOWER
2

TRIM
8 4

6 5
RTRIM
7 LTRIM
PLACE 3
1 LOCATE
2

8 4

6
CREATE A
7 TABLE 5
USE
DROP 3
1 MODIFY
2

PRIMARY
KEY
8 4

6 5
DELETE
7 UPDATE
1 FOREIGN JOIN 3
KEY 2

SUB-
QUERY
8 4

6 5
SUB-QUERY
7 FULL OUTER
JOIN

View publication stats

You might also like