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

SQL the Language of Data

SQL, or Structured Query Language, is essential for managing and manipulating data in databases, allowing operations such as retrieval, updating, and organization. It includes various commands categorized into Data Definition Language (DDL), Data Manipulation Language (DML), and Data Control Language (DCL), along with specific syntax and data types. SQL is widely used by major companies like Amazon, Google, Facebook, and Netflix for efficient data management.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

SQL the Language of Data

SQL, or Structured Query Language, is essential for managing and manipulating data in databases, allowing operations such as retrieval, updating, and organization. It includes various commands categorized into Data Definition Language (DDL), Data Manipulation Language (DML), and Data Control Language (DCL), along with specific syntax and data types. SQL is widely used by major companies like Amazon, Google, Facebook, and Netflix for efficient data management.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 10

SQL: The Language of Data

SQL, or Structured Query Language, is a powerful tool for


managing and manipulating data in databases. It allows you to
retrieve, update, and organize information, making it essential for
any data-driven operation.
uc
by umesh chauhan
SQL Syntax and Rules
Keywords Data Types

SQL uses reserved keywords like SELECT, INSERT, SQL defines various data types for different data,
UPDATE, DELETE, and WHERE to perform specific including INT, VARCHAR, DATE, and BOOLEAN, to
operations. These keywords are case-insensitive. ensure data integrity and efficient storage.
SQL Data Types
Numeric Text
INT, FLOAT, DECIMAL, etc., VARCHAR, CHAR, TEXT, etc.,
for storing numbers with for storing character strings.
different precision.

Date and Time


DATE, TIME, TIMESTAMP, etc., for storing dates and time information.
Types of SQL Commands

Data Definition Language (DDL)Data Manipulation Language Data Control Language (DCL)
(DML)
Commands like CREATE, ALTER, and Commands like GRANT and REVOKE
DROP manage database structure. Commands like SELECT, INSERT, control user access and permissions.
UPDATE, and DELETE modify data
within tables.
SQL Select Statement
1 SELECT
Specifies the columns to retrieve from the table.

2 FROM
Identifies the table to retrieve data from.

3 WHERE
Applies conditions to filter data.

4 ORDER BY
Sorts the results in ascending or descending order.
SQL Insert, Update, and
Delete
INSERT
Adds new rows to a table.

UPDATE
Modifies existing data in a table.

DELETE
Removes rows from a table.
SQL Joins
INNER JOIN
1 Returns rows matching in both tables.

LEFT JOIN
2
Returns all rows from the left table, matching or not.

RIGHT JOIN
3
Returns all rows from the right table, matching or not.

FULL JOIN
4
Returns all rows from both tables.
SQL Subqueries
Nested Query
1
A query embedded within another query.

Purpose
2
Used to filter or retrieve data based on the results of another query.

Example
3
Finding employees who earn more than the average salary.
SQL Stored Procedures

1 2
Pre-compiled Code Reusable
Stored within the database for Can be called multiple times
efficient execution. without rewriting the code.

3
Improved Security
Offers greater control and
security for data access.
Companies Using SQL Databases

Amazon Google Facebook Netflix

You might also like