0% found this document useful (0 votes)
18 views2 pages

Sqlintro

SQL (Structured Query Language) is a standard language for interacting with relational databases, enabling CRUD operations. The document outlines basic SQL commands, common clauses, and provides an example of a JOIN operation. Mastering SQL is crucial for effective data management and analysis.

Uploaded by

emnamadeni58
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)
18 views2 pages

Sqlintro

SQL (Structured Query Language) is a standard language for interacting with relational databases, enabling CRUD operations. The document outlines basic SQL commands, common clauses, and provides an example of a JOIN operation. Mastering SQL is crucial for effective data management and analysis.

Uploaded by

emnamadeni58
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

Introduction to SQL

Emna
July 26, 2025

1 What is SQL?
SQL (Structured Query Language) is a standard language used to interact with relational
databases. It allows you to create, read, update, and delete data (often referred to as CRUD
operations).

2 Basic SQL Commands


2.1 Creating a Table
CREATE TABLE Users (
ID INT PRIMARY KEY ,
Name VARCHAR (50) ,
Age INT
);

2.2 Inserting Data


INSERT INTO Users ( ID , Name , Age )
VALUES (1 , ’ Alice ’ , 25) ;

2.3 Reading Data


SELECT * FROM Users ;
SELECT Name FROM Users WHERE Age > 20;

2.4 Updating Data


UPDATE Users
SET Age = 26
WHERE ID = 1;

1
2.5 Deleting Data
DELETE FROM Users
WHERE ID = 1;

3 Common Clauses
• WHERE - Filters records

• ORDER BY - Sorts results

• GROUP BY - Groups rows

• HAVING - Filters groups

• JOIN - Combines rows from two or more tables

4 Example: JOIN
SELECT Orders . OrderID , Customers . Name
FROM Orders
JOIN Customers ON Orders . CustomerID = Customers . ID ;

5 Conclusion
SQL is essential for working with relational databases. Mastering SQL empowers you to
manage and analyze data effectively across a wide range of applications.

You might also like