Introduction to SQL for beginners - Beginner Guide
nudz27
13 views
9 slides
Sep 14, 2024
Slide 1 of 9
1
2
3
4
5
6
7
8
9
About This Presentation
SQL Introduction
Size: 56.1 KB
Language: en
Added: Sep 14, 2024
Slides: 9 pages
Slide Content
SQL (Structured Query Language) is a standardized programming language specifically designed for managing and manipulating relational databases . It is widely used for querying, updating, and managing data stored in relational database management systems (RDBMS)
Basic SQL Commands 1. Data Definition Language (DDL) DDL commands are used to define and modify the structure of database objects such as tables. 2. Data Manipulation Language (DML) DML commands are used for managing data within database tables.
DDL CREATE : Used to create a new table or database CREATE TABLE Employees ( EmployeeID INT PRIMARY KEY, FirstName VARCHAR(50), LastName VARCHAR(50), BirthDate DATE );
DDL ALTER : Used to modify an existing database object, like adding a column to a table. ALTER TABLE Employees ADD Email VARCHAR(100);
DDL DROP : Used to delete an existing database object. DROP TABLE Employees;
DML INSERT : Adds new records to a table. INSERT INTO Employees ( EmployeeID , FirstName, LastName , BirthDate ) VALUES (1, 'John', 'Doe', '1980-01-01');
DML SELECT : Retrieves data from one or more tables. SELECT * FROM Employees;
DML UPDATE : Modifies existing records UPDATE Employees SET Email = '[email protected]' WHERE EmployeeID = 1;
DML DELETE : Removes records from a table. DELETE FROM Employees WHERE EmployeeID = 1;