SlideShare a Scribd company logo
Introduction to SQL_02
‫کننده‬ ‫تهیه‬:‫عادل‬ ‫هللا‬ ‫عصمت‬
‫با‬ ‫معرفی‬SQL
Topics:
• SQL SELECT TOP Clause
• SQL LIKE Operator
• SQL IN Operator
• SQL INSERT INTO Statement
• SQL UPDATE Statement
• SQL DELETE Statement
•‫واره‬ ‫جمله‬Select top،SQL
•‫عملیه‬like،SQL
•‫عملیه‬In،SQL
•‫دستور‬Insert into،SQL
•‫دستور‬update،SQL
•‫دستور‬delete،SQL
2:04 AM
Gharjistan University Computer Science
Faculty Farah Branch
2
SQL SELECT TOP Clause:
• The SELECT TOP clause is
used to specify the number
of records to return.
• The SELECT TOP clause can
be very useful on large
tables with thousands of
records. Returning a large
number of records can
impact on performance.
• Note: Not all database
systems support the SELECT
TOP clause.
•‫واره‬ ‫جمله‬select top‫برای‬
‫ریکاردهایکه‬ ‫تعداد‬ ‫کردن‬ ‫مشخص‬
‫میرود‬ ‫بکار‬ ‫میشود‬ ‫داده‬ ‫برگشت‬.
•‫واره‬ ‫جمله‬select top‫جدول‬ ‫در‬
‫هزاران‬ ‫تعداد‬ ‫به‬ ‫که‬ ‫بزرگ‬ ‫های‬
‫واقع‬ ‫مفید‬ ‫بسیار‬ ‫داشته‬ ‫ریکارد‬‫شده‬
‫میتواند‬.‫ب‬ ‫ریکاردها‬ ‫دادن‬ ‫برگشت‬‫ه‬
‫اجراعات‬ ‫کیفیت‬ ‫روی‬ ‫زیاد‬ ‫تعداد‬
‫میتواند‬ ‫مانده‬ ‫تأثیر‬.
•‫یادداشت‬:‫دیتاب‬ ‫های‬ ‫سیستم‬ ‫تمام‬‫یس‬
‫واره‬ ‫جمله‬select top‫پشتیبانی‬ ‫را‬
‫نمیکند‬.
2:04 AM
Gharjistan University Computer Science
Faculty Farah Branch
3
Continue…
• SQL Server / MS Access Syntax:
• SELECT TOP number|percent column_name(s) FROM
table_name;
• MySQL Syntax:
• SELECT column_name(s) FROM table_name LIMIT number;
• Examples:
1. SELECT TOP 2 * FROM Customers;
2. SELECT TOP 50 PERCENT * FROM Customers;
3. SELECT * FROM Persons LIMIT 5;
2:04 AM
Gharjistan University Computer Science
Faculty Farah Branch
4
SQL LIKE Operator:
• The LIKE operator is used in
a WHERE clause to search
for a specified pattern in a
column.
• Syntax:
• SELECT column_name(s)
FROM table_name
WHERE column_name LIKE
pattern;
•‫عملیه‬like‫واره‬ ‫جمله‬ ‫در‬where
‫در‬ ‫خاص‬ ‫شیوه‬ ‫یک‬ ‫دریافتن‬ ‫برای‬
‫میرود‬ ‫بکار‬ ‫ستون‬ ‫یک‬.
•‫ساختار‬:
• SELECT column_name(s)
FROM table_name
WHERE column_name LIKE
pattern;
2:04 AM
Gharjistan University Computer Science
Faculty Farah Branch
5
Continue…
• Examples:
• SELECT * FROM Customers WHERE City LIKE 's%';
• SELECT * FROM Customers WHERE City LIKE '%s';
• SELECT * FROM Customers WHERE Country LIKE '%land%';
2:04 AM
Gharjistan University Computer Science
Faculty Farah Branch
6
SQL IN Operator:
• The IN operator allows you
to specify multiple values in
a WHERE clause.
• Syntax:
• SELECT column_name(s)
FROM table_name
WHERE column_name IN
(value1,value2,...);
•‫عملیه‬IN‫کردن‬ ‫مشخص‬ ‫بخاطر‬
‫واره‬ ‫جمله‬ ‫در‬ ‫قیمت‬ ‫چندین‬where
‫میرود‬ ‫بکار‬.
•‫ساختار‬:
• SELECT column_name(s)
FROM table_name
WHERE column_name IN
(value1,value2,...);
2:04 AM
Gharjistan University Computer Science
Faculty Farah Branch
7
Continue…
• Example:
• SELECT * FROM Customers WHERE City IN ('Paris','London');
2:04 AM
Gharjistan University Computer Science
Faculty Farah Branch
8
SQL INSERT INTO Statement:
• The INSERT INTO statement
is used to insert new
records in a table.
• Syntax:
• It is possible to write the
INSERT INTO statement in
two forms.
• The first form does not
specify the column names
where the data will be
inserted, only their values
as follow:
•‫دستور‬insert into‫درج‬ ‫برای‬
‫دیتابیس‬ ‫به‬ ‫جدید‬ ‫ریکارد‬ ‫کردن‬‫بکار‬
‫میرود‬.
•‫ساختار‬:
•‫دستور‬insert into‫شکل‬ ‫بدو‬
‫شود‬ ‫نوشته‬ ‫ممکن‬.
•‫نمی‬ ‫مشخص‬ ‫ها‬ ‫ستون‬ ‫که‬ ‫اول‬ ‫روش‬
‫جدول‬ ‫یک‬ ‫درج‬ ‫ها‬ ‫قیمت‬ ‫فقط‬ ‫و‬ ‫شود‬
‫ذیل‬ ‫قرار‬ ‫میگردد‬:
Nangarhar University Database1 9
Continue…
• INSERT INTO table_name
VALUES
(value1,value2,value3,...);
• The second form specifies
both the column names and
the values to be inserted:
• INSERT INTO table_name
(column1,column2,column3,
...)
VALUES
(value1,value2,value3,...);
• INSERT INTO table_name
VALUES
(value1,value2,value3,...);
•‫هم‬ ‫و‬ ‫ها‬ ‫ستون‬ ‫هم‬ ‫دوم‬ ‫روش‬ ‫در‬
‫مشخص‬ ‫میگردد‬ ‫درج‬ ‫که‬ ‫های‬ ‫قیمت‬
‫ذیل‬ ‫قرار‬ ‫میشود‬:
• INSERT INTO table_name
(column1,column2,column3,
...)
VALUES
(value1,value2,value3,...);
Nangarhar University Database1 10
Continue…
• Examples:
1. INSERT INTO Customers (CustomerName, City, Country)
VALUES ('Cardinal', 'Stavanger', 'Norway');
2. INSERT INTO Customers
VALUES ('Cardinal', 'Stavanger', 'Norway');
2:04 AM
Gharjistan University Computer Science
Faculty Farah Branch
11
SQL UPDATE Statement:
• The UPDATE statement is
used to update existing
records in a table.
• Syntax:
UPDATE table_name
SET column1=value1,
column2=value2,...
WHERE
some_column=some_value;
•‫دستور‬Update‫روز‬ ‫به‬ ‫برای‬
‫یک‬ ‫در‬ ‫موجود‬ ‫ریکاردهای‬ ‫کردن‬
‫میرود‬ ‫بکار‬ ‫جدول‬.
•‫ساختار‬:
• UPDATE table_name
SET column1=value1,
column2=value2,...
WHERE
some_column=some_value;
2:04 AM
Gharjistan University Computer Science
Faculty Farah Branch
12
Continue…
• Examples:
• UPDATE Customers SET ContactName='Alfred Schmidt',
City='Hamburg‘ WHERE CustomerName='Alfreds Futterkiste';
2:04 AM
Gharjistan University Computer Science
Faculty Farah Branch
13
Continue…
• Update Warning!
• Be careful when updating
records. If we had omitted
the WHERE clause, in the
example above, like this:
• UPDATE Customers
SET ContactName='Alfred
Schmidt', City='Hamburg';
• All the records in the
customer table will be
updated.
•‫درآوردن‬ ‫روز‬ ‫به‬ ‫هشدار‬:
•‫آوردن‬ ‫روز‬ ‫به‬ ‫در‬ ‫که‬ ‫باشید‬ ‫متوجه‬
‫واره‬ ‫جمله‬ ‫هرگاه‬ ‫ریکاردها‬where
‫رو‬ ‫به‬ ‫ها‬ ‫ریکارد‬ ‫تمام‬ ‫ننویسیم‬ ‫را‬‫ز‬
‫ذیل‬ ‫قرار‬ ‫شد‬ ‫خواهد‬ ‫درآورده‬:
• UPDATE Customers
SET ContactName='Alfred
Schmidt', City='Hamburg';
2:04 AM
Gharjistan University Computer Science
Faculty Farah Branch
14
SQL DELETE Statement:
• The DELETE statement is
used to delete records in a
table.
• Syntax:
• DELETE FROM table_name
WHERE
some_column=some_value;
•‫دستور‬delete‫کردن‬ ‫حذف‬ ‫برای‬
‫بکار‬ ‫جدول‬ ‫یک‬ ‫در‬ ‫ریکاردها‬
‫میرود‬.
•‫ساختار‬:
• DELETE FROM table_name
WHERE
some_column=some_value;
2:04 AM
Gharjistan University Computer Science
Faculty Farah Branch
15
Continue…
• Examples:
• DELETE FROM Customers WHERE CustomerName='Alfreds
Futterkiste' AND ContactName='Maria Anders';
Nangarhar University Database1 16
Delete All Data:
• It is possible to delete all
rows in a table without
deleting the table. This
means that the table
structure, attributes, and
indexes will be intact:
• Syntax:
• DELETE FROM table_name;
or
DELETE * FROM
table_name;
•‫یک‬ ‫در‬ ‫سطرها‬ ‫تمام‬ ‫که‬ ‫است‬ ‫ممکن‬
‫حذف‬ ‫جدول‬ ‫خود‬ ‫اینکه‬ ‫بدون‬ ‫جدول‬
‫کرد‬ ‫حذف‬ ‫شود‬.‫که‬ ‫معنا‬ ‫این‬ ‫به‬
‫و‬ ‫خاصه‬ ‫صفات‬ ،‫جدول‬ ‫ساختار‬
index‫باقی‬ ‫درست‬ ‫و‬ ‫ثابت‬ ‫آن‬ ‫های‬
‫ماند‬ ‫خواهد‬.
•‫ساختار‬:
• DELETE FROM table_name;
or
DELETE * FROM
table_name;
Nangarhar University Database1 17
Continue…
• Note: Be very careful when
deleting records. You
cannot undo this
statement!
•‫نوت‬:
•‫هاه‬ ‫ریکارد‬ ‫کردن‬ ‫حذف‬ ‫وقت‬ ‫در‬
‫دوبا‬ ‫چونکه‬ ‫باشید‬ ‫مواظب‬ ‫بسیار‬‫ره‬
‫را‬ ‫دستور‬ ‫این‬ ‫که‬ ‫نمیتوانید‬undo
‫کنید‬.
Nangarhar University Database1 18
2:04 AM
Gharjistan University Computer Science
Faculty Farah Branch
19

More Related Content

What's hot

Oracle PL/SQL Bulk binds
Oracle PL/SQL Bulk bindsOracle PL/SQL Bulk binds
Oracle PL/SQL Bulk binds
Scott Wesley
 
Oracle: Procedures
Oracle: ProceduresOracle: Procedures
Oracle: Procedures
DataminingTools Inc
 
Apps1
Apps1Apps1
Sql Functions And Procedures
Sql Functions And ProceduresSql Functions And Procedures
Sql Functions And Procedures
DataminingTools Inc
 
MySQL Query And Index Tuning
MySQL Query And Index TuningMySQL Query And Index Tuning
MySQL Query And Index Tuning
Manikanda kumar
 
Lab1 select statement
Lab1 select statementLab1 select statement
Lab1 select statement
Balqees Al.Mubarak
 
Sql server ___________session_18(stored procedures)
Sql server  ___________session_18(stored procedures)Sql server  ___________session_18(stored procedures)
Sql server ___________session_18(stored procedures)
Ehtisham Ali
 
How mysql choose the execution plan
How mysql choose the execution planHow mysql choose the execution plan
How mysql choose the execution plan
辛鹤 李
 
SignalR & SQL Dependency
SignalR & SQL DependencySignalR & SQL Dependency
SignalR & SQL Dependency
Narato
 
plsql Lec11
plsql Lec11 plsql Lec11
plsql Lec11
sasa_eldoby
 
Stored procedures
Stored proceduresStored procedures
Myth busters - performance tuning 101 2007
Myth busters - performance tuning 101 2007Myth busters - performance tuning 101 2007
Myth busters - performance tuning 101 2007
paulguerin
 
Oracle - Program with PL/SQL - Lession 16
Oracle - Program with PL/SQL - Lession 16Oracle - Program with PL/SQL - Lession 16
Oracle - Program with PL/SQL - Lession 16
Thuan Nguyen
 
Sql parametrized queries
Sql parametrized queriesSql parametrized queries
Sql parametrized queries
Hadi Fadlallah
 
Oracle SQL, PL/SQL Performance tuning
Oracle SQL, PL/SQL Performance tuningOracle SQL, PL/SQL Performance tuning
Oracle SQL, PL/SQL Performance tuning
Smitha Padmanabhan
 
Oracle Forms : Query Triggers
Oracle Forms : Query TriggersOracle Forms : Query Triggers
Oracle Forms : Query Triggers
Sekhar Byna
 
Chapter 3 stored procedures
Chapter 3 stored proceduresChapter 3 stored procedures
Sql triggers
Sql triggersSql triggers
Sql triggers
Chandan Banerjee
 

What's hot (18)

Oracle PL/SQL Bulk binds
Oracle PL/SQL Bulk bindsOracle PL/SQL Bulk binds
Oracle PL/SQL Bulk binds
 
Oracle: Procedures
Oracle: ProceduresOracle: Procedures
Oracle: Procedures
 
Apps1
Apps1Apps1
Apps1
 
Sql Functions And Procedures
Sql Functions And ProceduresSql Functions And Procedures
Sql Functions And Procedures
 
MySQL Query And Index Tuning
MySQL Query And Index TuningMySQL Query And Index Tuning
MySQL Query And Index Tuning
 
Lab1 select statement
Lab1 select statementLab1 select statement
Lab1 select statement
 
Sql server ___________session_18(stored procedures)
Sql server  ___________session_18(stored procedures)Sql server  ___________session_18(stored procedures)
Sql server ___________session_18(stored procedures)
 
How mysql choose the execution plan
How mysql choose the execution planHow mysql choose the execution plan
How mysql choose the execution plan
 
SignalR & SQL Dependency
SignalR & SQL DependencySignalR & SQL Dependency
SignalR & SQL Dependency
 
plsql Lec11
plsql Lec11 plsql Lec11
plsql Lec11
 
Stored procedures
Stored proceduresStored procedures
Stored procedures
 
Myth busters - performance tuning 101 2007
Myth busters - performance tuning 101 2007Myth busters - performance tuning 101 2007
Myth busters - performance tuning 101 2007
 
Oracle - Program with PL/SQL - Lession 16
Oracle - Program with PL/SQL - Lession 16Oracle - Program with PL/SQL - Lession 16
Oracle - Program with PL/SQL - Lession 16
 
Sql parametrized queries
Sql parametrized queriesSql parametrized queries
Sql parametrized queries
 
Oracle SQL, PL/SQL Performance tuning
Oracle SQL, PL/SQL Performance tuningOracle SQL, PL/SQL Performance tuning
Oracle SQL, PL/SQL Performance tuning
 
Oracle Forms : Query Triggers
Oracle Forms : Query TriggersOracle Forms : Query Triggers
Oracle Forms : Query Triggers
 
Chapter 3 stored procedures
Chapter 3 stored proceduresChapter 3 stored procedures
Chapter 3 stored procedures
 
Sql triggers
Sql triggersSql triggers
Sql triggers
 

Viewers also liked

How to speak in public
How to speak in publicHow to speak in public
How to speak in public
Jawid Qaumi
 
Lecture 1. java database connectivity
Lecture 1. java database connectivityLecture 1. java database connectivity
Lecture 1. java database connectivity
Waheedullah Suliman Khail
 
E learning ict4-d_presentation
E learning ict4-d_presentationE learning ict4-d_presentation
E learning ict4-d_presentation
Faculty of Computer Science Nangarhar University
 
Web design - Working with forms in HTML
Web design - Working with forms in HTMLWeb design - Working with forms in HTML
Web design - Working with forms in HTML
Mustafa Kamel Mohammadi
 
Tarjumaye jadwali-quran-karim-pdf
Tarjumaye jadwali-quran-karim-pdfTarjumaye jadwali-quran-karim-pdf
Tarjumaye jadwali-quran-karim-pdf
BU
 
How to take control of your l ife
How to take control of your l ifeHow to take control of your l ife
How to take control of your l ife
Mashooq Jami
 
Introduction to graph databases in term of neo4j
Introduction to graph databases in term of neo4jIntroduction to graph databases in term of neo4j
Introduction to graph databases in term of neo4j
Abdullah Hamidi
 
Bitcharities Cause Presentation
Bitcharities Cause PresentationBitcharities Cause Presentation
Bitcharities Cause Presentation
Francesco Rulli
 
Simple past
Simple pastSimple past
Simple past
Zainab Bahar Aminy
 
Computational Advertising
Computational AdvertisingComputational Advertising
Computational Advertising
AhmadShah Sultani
 
Web app development_cookies_sessions_14
Web app development_cookies_sessions_14Web app development_cookies_sessions_14
Web app development_cookies_sessions_14
Hassen Poreya
 
Web Application Security and Awareness
Web Application Security and AwarenessWeb Application Security and Awareness
Web Application Security and Awareness
Abdul Rahman Sherzad
 
Fondo gallerie storiche romane - Destinazione Donna - catalogo della mostra
Fondo gallerie storiche romane - Destinazione Donna - catalogo della mostraFondo gallerie storiche romane - Destinazione Donna - catalogo della mostra
Fondo gallerie storiche romane - Destinazione Donna - catalogo della mostra
Alessandro Califano, PhD
 
Google Search Console
Google Search ConsoleGoogle Search Console
Google Search Console
Hekmat Sarwarzada
 
Enterprise Resource Planning using Odoo/OpenERP in Afghanistan
Enterprise Resource Planning using Odoo/OpenERP in AfghanistanEnterprise Resource Planning using Odoo/OpenERP in Afghanistan
Enterprise Resource Planning using Odoo/OpenERP in Afghanistan
Farshid Ghyasi
 
Architecting for failure - Why are distributed systems hard?
Architecting for failure - Why are distributed systems hard?Architecting for failure - Why are distributed systems hard?
Architecting for failure - Why are distributed systems hard?
Markus Eisele
 
Mite Nroc Beebe Aeqa
Mite Nroc Beebe AeqaMite Nroc Beebe Aeqa
Mite Nroc Beebe Aeqa
Global Networks
 
Bootstrap day3
Bootstrap day3Bootstrap day3
Bootstrap day3
Rafi Haidari
 
Monitoring Virtualized Environments
Monitoring Virtualized EnvironmentsMonitoring Virtualized Environments
Monitoring Virtualized Environments
Ahmad Khalid Nasrat
 

Viewers also liked (20)

How to speak in public
How to speak in publicHow to speak in public
How to speak in public
 
Lecture 1. java database connectivity
Lecture 1. java database connectivityLecture 1. java database connectivity
Lecture 1. java database connectivity
 
E learning ict4-d_presentation
E learning ict4-d_presentationE learning ict4-d_presentation
E learning ict4-d_presentation
 
Web design - Working with forms in HTML
Web design - Working with forms in HTMLWeb design - Working with forms in HTML
Web design - Working with forms in HTML
 
Tarjumaye jadwali-quran-karim-pdf
Tarjumaye jadwali-quran-karim-pdfTarjumaye jadwali-quran-karim-pdf
Tarjumaye jadwali-quran-karim-pdf
 
How to take control of your l ife
How to take control of your l ifeHow to take control of your l ife
How to take control of your l ife
 
Introduction to graph databases in term of neo4j
Introduction to graph databases in term of neo4jIntroduction to graph databases in term of neo4j
Introduction to graph databases in term of neo4j
 
Bitcharities Cause Presentation
Bitcharities Cause PresentationBitcharities Cause Presentation
Bitcharities Cause Presentation
 
MyCV
MyCVMyCV
MyCV
 
Simple past
Simple pastSimple past
Simple past
 
Computational Advertising
Computational AdvertisingComputational Advertising
Computational Advertising
 
Web app development_cookies_sessions_14
Web app development_cookies_sessions_14Web app development_cookies_sessions_14
Web app development_cookies_sessions_14
 
Web Application Security and Awareness
Web Application Security and AwarenessWeb Application Security and Awareness
Web Application Security and Awareness
 
Fondo gallerie storiche romane - Destinazione Donna - catalogo della mostra
Fondo gallerie storiche romane - Destinazione Donna - catalogo della mostraFondo gallerie storiche romane - Destinazione Donna - catalogo della mostra
Fondo gallerie storiche romane - Destinazione Donna - catalogo della mostra
 
Google Search Console
Google Search ConsoleGoogle Search Console
Google Search Console
 
Enterprise Resource Planning using Odoo/OpenERP in Afghanistan
Enterprise Resource Planning using Odoo/OpenERP in AfghanistanEnterprise Resource Planning using Odoo/OpenERP in Afghanistan
Enterprise Resource Planning using Odoo/OpenERP in Afghanistan
 
Architecting for failure - Why are distributed systems hard?
Architecting for failure - Why are distributed systems hard?Architecting for failure - Why are distributed systems hard?
Architecting for failure - Why are distributed systems hard?
 
Mite Nroc Beebe Aeqa
Mite Nroc Beebe AeqaMite Nroc Beebe Aeqa
Mite Nroc Beebe Aeqa
 
Bootstrap day3
Bootstrap day3Bootstrap day3
Bootstrap day3
 
Monitoring Virtualized Environments
Monitoring Virtualized EnvironmentsMonitoring Virtualized Environments
Monitoring Virtualized Environments
 

Similar to Introduction to sql_02

UNIT2.ppt
UNIT2.pptUNIT2.ppt
UNIT2.ppt
SaurabhLokare1
 
IR SQLite Session #1
IR SQLite Session #1IR SQLite Session #1
IR SQLite Session #1
InfoRepos Technologies
 
SQL Assessment Command Statements
SQL Assessment Command StatementsSQL Assessment Command Statements
SQL Assessment Command Statements
Shaun Wilson
 
SQL NAD DB.pptx
SQL NAD DB.pptxSQL NAD DB.pptx
SQL NAD DB.pptx
muhammadhumza26
 
Performance tuning
Performance tuningPerformance tuning
Performance tuning
ami111
 
Public Training SQL Implementation & Embedded Programming in IBM i (05-09 Jun...
Public Training SQL Implementation & Embedded Programming in IBM i (05-09 Jun...Public Training SQL Implementation & Embedded Programming in IBM i (05-09 Jun...
Public Training SQL Implementation & Embedded Programming in IBM i (05-09 Jun...
Hany Paulina
 
Public Training SQL Implementation & Embedded Programming in IBM i
Public Training SQL Implementation & Embedded Programming in IBM iPublic Training SQL Implementation & Embedded Programming in IBM i
Public Training SQL Implementation & Embedded Programming in IBM i
Hany Paulina
 
stored.ppt
stored.pptstored.ppt
122 sql for-beginners
122 sql for-beginners122 sql for-beginners
122 sql for-beginners
suzzanj1990
 
Introduction to mysql part 3
Introduction to mysql part 3Introduction to mysql part 3
SQL Beginners anishurrehman.cloud.pdf
SQL Beginners anishurrehman.cloud.pdfSQL Beginners anishurrehman.cloud.pdf
SQL Beginners anishurrehman.cloud.pdf
AnishurRehman1
 
Sql coding-standard-sqlserver
Sql coding-standard-sqlserverSql coding-standard-sqlserver
Sql coding-standard-sqlserver
lochaaaa
 
PL_SQL - II.pptx
PL_SQL - II.pptxPL_SQL - II.pptx
PL_SQL - II.pptx
priyaprakash11
 
Pl sql
Pl sqlPl sql
Lecture 2.3.26_Conditional Control Structure.pptx
Lecture 2.3.26_Conditional Control Structure.pptxLecture 2.3.26_Conditional Control Structure.pptx
Lecture 2.3.26_Conditional Control Structure.pptx
Shivam481778
 
Day 6.pptx
Day 6.pptxDay 6.pptx
Day 6.pptx
atreesgalaxy
 
Unit - II.pptx
Unit - II.pptxUnit - II.pptx
Unit - II.pptx
MrsSavitaKumbhare
 
SQL LECTURE.pptx
SQL LECTURE.pptxSQL LECTURE.pptx
SQL LECTURE.pptx
TechnoSavage
 
Oracle Database 12c New Features for Developers and DBAs - OTN TOUR LA 2015
Oracle Database 12c  New Features for Developers and DBAs - OTN TOUR LA 2015Oracle Database 12c  New Features for Developers and DBAs - OTN TOUR LA 2015
Oracle Database 12c New Features for Developers and DBAs - OTN TOUR LA 2015
Alex Zaballa
 
2..basic queries.pptx
2..basic queries.pptx2..basic queries.pptx
2..basic queries.pptx
MalaikaRahatQurashi
 

Similar to Introduction to sql_02 (20)

UNIT2.ppt
UNIT2.pptUNIT2.ppt
UNIT2.ppt
 
IR SQLite Session #1
IR SQLite Session #1IR SQLite Session #1
IR SQLite Session #1
 
SQL Assessment Command Statements
SQL Assessment Command StatementsSQL Assessment Command Statements
SQL Assessment Command Statements
 
SQL NAD DB.pptx
SQL NAD DB.pptxSQL NAD DB.pptx
SQL NAD DB.pptx
 
Performance tuning
Performance tuningPerformance tuning
Performance tuning
 
Public Training SQL Implementation & Embedded Programming in IBM i (05-09 Jun...
Public Training SQL Implementation & Embedded Programming in IBM i (05-09 Jun...Public Training SQL Implementation & Embedded Programming in IBM i (05-09 Jun...
Public Training SQL Implementation & Embedded Programming in IBM i (05-09 Jun...
 
Public Training SQL Implementation & Embedded Programming in IBM i
Public Training SQL Implementation & Embedded Programming in IBM iPublic Training SQL Implementation & Embedded Programming in IBM i
Public Training SQL Implementation & Embedded Programming in IBM i
 
stored.ppt
stored.pptstored.ppt
stored.ppt
 
122 sql for-beginners
122 sql for-beginners122 sql for-beginners
122 sql for-beginners
 
Introduction to mysql part 3
Introduction to mysql part 3Introduction to mysql part 3
Introduction to mysql part 3
 
SQL Beginners anishurrehman.cloud.pdf
SQL Beginners anishurrehman.cloud.pdfSQL Beginners anishurrehman.cloud.pdf
SQL Beginners anishurrehman.cloud.pdf
 
Sql coding-standard-sqlserver
Sql coding-standard-sqlserverSql coding-standard-sqlserver
Sql coding-standard-sqlserver
 
PL_SQL - II.pptx
PL_SQL - II.pptxPL_SQL - II.pptx
PL_SQL - II.pptx
 
Pl sql
Pl sqlPl sql
Pl sql
 
Lecture 2.3.26_Conditional Control Structure.pptx
Lecture 2.3.26_Conditional Control Structure.pptxLecture 2.3.26_Conditional Control Structure.pptx
Lecture 2.3.26_Conditional Control Structure.pptx
 
Day 6.pptx
Day 6.pptxDay 6.pptx
Day 6.pptx
 
Unit - II.pptx
Unit - II.pptxUnit - II.pptx
Unit - II.pptx
 
SQL LECTURE.pptx
SQL LECTURE.pptxSQL LECTURE.pptx
SQL LECTURE.pptx
 
Oracle Database 12c New Features for Developers and DBAs - OTN TOUR LA 2015
Oracle Database 12c  New Features for Developers and DBAs - OTN TOUR LA 2015Oracle Database 12c  New Features for Developers and DBAs - OTN TOUR LA 2015
Oracle Database 12c New Features for Developers and DBAs - OTN TOUR LA 2015
 
2..basic queries.pptx
2..basic queries.pptx2..basic queries.pptx
2..basic queries.pptx
 

More from Esmatullah Adel

Introduction to sql_01
Introduction to sql_01Introduction to sql_01
Introduction to sql_01
Esmatullah Adel
 
Mapping in database
Mapping in databaseMapping in database
Mapping in database
Esmatullah Adel
 
Enhanced entity relationship model
Enhanced entity relationship modelEnhanced entity relationship model
Enhanced entity relationship model
Esmatullah Adel
 
Relationship in database
Relationship in databaseRelationship in database
Relationship in database
Esmatullah Adel
 
Identifiers in database
Identifiers in databaseIdentifiers in database
Identifiers in database
Esmatullah Adel
 
Requirements analysis
Requirements analysisRequirements analysis
Requirements analysis
Esmatullah Adel
 
Introduction to database
Introduction to databaseIntroduction to database
Introduction to database
Esmatullah Adel
 

More from Esmatullah Adel (7)

Introduction to sql_01
Introduction to sql_01Introduction to sql_01
Introduction to sql_01
 
Mapping in database
Mapping in databaseMapping in database
Mapping in database
 
Enhanced entity relationship model
Enhanced entity relationship modelEnhanced entity relationship model
Enhanced entity relationship model
 
Relationship in database
Relationship in databaseRelationship in database
Relationship in database
 
Identifiers in database
Identifiers in databaseIdentifiers in database
Identifiers in database
 
Requirements analysis
Requirements analysisRequirements analysis
Requirements analysis
 
Introduction to database
Introduction to databaseIntroduction to database
Introduction to database
 

Recently uploaded

Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStrDeep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
saastr
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!
GDSC PJATK
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Operating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptxOperating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptx
Pravash Chandra Das
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Trusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process MiningTrusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process Mining
LucaBarbaro3
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
HarisZaheer8
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Jeffrey Haguewood
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
saastr
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 

Recently uploaded (20)

Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStrDeep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
Deep Dive: Getting Funded with Jason Jason Lemkin Founder & CEO @ SaaStr
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Operating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptxOperating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptx
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Trusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process MiningTrusted Execution Environment for Decentralized Process Mining
Trusted Execution Environment for Decentralized Process Mining
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 

Introduction to sql_02

  • 1. Introduction to SQL_02 ‫کننده‬ ‫تهیه‬:‫عادل‬ ‫هللا‬ ‫عصمت‬ ‫با‬ ‫معرفی‬SQL
  • 2. Topics: • SQL SELECT TOP Clause • SQL LIKE Operator • SQL IN Operator • SQL INSERT INTO Statement • SQL UPDATE Statement • SQL DELETE Statement •‫واره‬ ‫جمله‬Select top،SQL •‫عملیه‬like،SQL •‫عملیه‬In،SQL •‫دستور‬Insert into،SQL •‫دستور‬update،SQL •‫دستور‬delete،SQL 2:04 AM Gharjistan University Computer Science Faculty Farah Branch 2
  • 3. SQL SELECT TOP Clause: • The SELECT TOP clause is used to specify the number of records to return. • The SELECT TOP clause can be very useful on large tables with thousands of records. Returning a large number of records can impact on performance. • Note: Not all database systems support the SELECT TOP clause. •‫واره‬ ‫جمله‬select top‫برای‬ ‫ریکاردهایکه‬ ‫تعداد‬ ‫کردن‬ ‫مشخص‬ ‫میرود‬ ‫بکار‬ ‫میشود‬ ‫داده‬ ‫برگشت‬. •‫واره‬ ‫جمله‬select top‫جدول‬ ‫در‬ ‫هزاران‬ ‫تعداد‬ ‫به‬ ‫که‬ ‫بزرگ‬ ‫های‬ ‫واقع‬ ‫مفید‬ ‫بسیار‬ ‫داشته‬ ‫ریکارد‬‫شده‬ ‫میتواند‬.‫ب‬ ‫ریکاردها‬ ‫دادن‬ ‫برگشت‬‫ه‬ ‫اجراعات‬ ‫کیفیت‬ ‫روی‬ ‫زیاد‬ ‫تعداد‬ ‫میتواند‬ ‫مانده‬ ‫تأثیر‬. •‫یادداشت‬:‫دیتاب‬ ‫های‬ ‫سیستم‬ ‫تمام‬‫یس‬ ‫واره‬ ‫جمله‬select top‫پشتیبانی‬ ‫را‬ ‫نمیکند‬. 2:04 AM Gharjistan University Computer Science Faculty Farah Branch 3
  • 4. Continue… • SQL Server / MS Access Syntax: • SELECT TOP number|percent column_name(s) FROM table_name; • MySQL Syntax: • SELECT column_name(s) FROM table_name LIMIT number; • Examples: 1. SELECT TOP 2 * FROM Customers; 2. SELECT TOP 50 PERCENT * FROM Customers; 3. SELECT * FROM Persons LIMIT 5; 2:04 AM Gharjistan University Computer Science Faculty Farah Branch 4
  • 5. SQL LIKE Operator: • The LIKE operator is used in a WHERE clause to search for a specified pattern in a column. • Syntax: • SELECT column_name(s) FROM table_name WHERE column_name LIKE pattern; •‫عملیه‬like‫واره‬ ‫جمله‬ ‫در‬where ‫در‬ ‫خاص‬ ‫شیوه‬ ‫یک‬ ‫دریافتن‬ ‫برای‬ ‫میرود‬ ‫بکار‬ ‫ستون‬ ‫یک‬. •‫ساختار‬: • SELECT column_name(s) FROM table_name WHERE column_name LIKE pattern; 2:04 AM Gharjistan University Computer Science Faculty Farah Branch 5
  • 6. Continue… • Examples: • SELECT * FROM Customers WHERE City LIKE 's%'; • SELECT * FROM Customers WHERE City LIKE '%s'; • SELECT * FROM Customers WHERE Country LIKE '%land%'; 2:04 AM Gharjistan University Computer Science Faculty Farah Branch 6
  • 7. SQL IN Operator: • The IN operator allows you to specify multiple values in a WHERE clause. • Syntax: • SELECT column_name(s) FROM table_name WHERE column_name IN (value1,value2,...); •‫عملیه‬IN‫کردن‬ ‫مشخص‬ ‫بخاطر‬ ‫واره‬ ‫جمله‬ ‫در‬ ‫قیمت‬ ‫چندین‬where ‫میرود‬ ‫بکار‬. •‫ساختار‬: • SELECT column_name(s) FROM table_name WHERE column_name IN (value1,value2,...); 2:04 AM Gharjistan University Computer Science Faculty Farah Branch 7
  • 8. Continue… • Example: • SELECT * FROM Customers WHERE City IN ('Paris','London'); 2:04 AM Gharjistan University Computer Science Faculty Farah Branch 8
  • 9. SQL INSERT INTO Statement: • The INSERT INTO statement is used to insert new records in a table. • Syntax: • It is possible to write the INSERT INTO statement in two forms. • The first form does not specify the column names where the data will be inserted, only their values as follow: •‫دستور‬insert into‫درج‬ ‫برای‬ ‫دیتابیس‬ ‫به‬ ‫جدید‬ ‫ریکارد‬ ‫کردن‬‫بکار‬ ‫میرود‬. •‫ساختار‬: •‫دستور‬insert into‫شکل‬ ‫بدو‬ ‫شود‬ ‫نوشته‬ ‫ممکن‬. •‫نمی‬ ‫مشخص‬ ‫ها‬ ‫ستون‬ ‫که‬ ‫اول‬ ‫روش‬ ‫جدول‬ ‫یک‬ ‫درج‬ ‫ها‬ ‫قیمت‬ ‫فقط‬ ‫و‬ ‫شود‬ ‫ذیل‬ ‫قرار‬ ‫میگردد‬: Nangarhar University Database1 9
  • 10. Continue… • INSERT INTO table_name VALUES (value1,value2,value3,...); • The second form specifies both the column names and the values to be inserted: • INSERT INTO table_name (column1,column2,column3, ...) VALUES (value1,value2,value3,...); • INSERT INTO table_name VALUES (value1,value2,value3,...); •‫هم‬ ‫و‬ ‫ها‬ ‫ستون‬ ‫هم‬ ‫دوم‬ ‫روش‬ ‫در‬ ‫مشخص‬ ‫میگردد‬ ‫درج‬ ‫که‬ ‫های‬ ‫قیمت‬ ‫ذیل‬ ‫قرار‬ ‫میشود‬: • INSERT INTO table_name (column1,column2,column3, ...) VALUES (value1,value2,value3,...); Nangarhar University Database1 10
  • 11. Continue… • Examples: 1. INSERT INTO Customers (CustomerName, City, Country) VALUES ('Cardinal', 'Stavanger', 'Norway'); 2. INSERT INTO Customers VALUES ('Cardinal', 'Stavanger', 'Norway'); 2:04 AM Gharjistan University Computer Science Faculty Farah Branch 11
  • 12. SQL UPDATE Statement: • The UPDATE statement is used to update existing records in a table. • Syntax: UPDATE table_name SET column1=value1, column2=value2,... WHERE some_column=some_value; •‫دستور‬Update‫روز‬ ‫به‬ ‫برای‬ ‫یک‬ ‫در‬ ‫موجود‬ ‫ریکاردهای‬ ‫کردن‬ ‫میرود‬ ‫بکار‬ ‫جدول‬. •‫ساختار‬: • UPDATE table_name SET column1=value1, column2=value2,... WHERE some_column=some_value; 2:04 AM Gharjistan University Computer Science Faculty Farah Branch 12
  • 13. Continue… • Examples: • UPDATE Customers SET ContactName='Alfred Schmidt', City='Hamburg‘ WHERE CustomerName='Alfreds Futterkiste'; 2:04 AM Gharjistan University Computer Science Faculty Farah Branch 13
  • 14. Continue… • Update Warning! • Be careful when updating records. If we had omitted the WHERE clause, in the example above, like this: • UPDATE Customers SET ContactName='Alfred Schmidt', City='Hamburg'; • All the records in the customer table will be updated. •‫درآوردن‬ ‫روز‬ ‫به‬ ‫هشدار‬: •‫آوردن‬ ‫روز‬ ‫به‬ ‫در‬ ‫که‬ ‫باشید‬ ‫متوجه‬ ‫واره‬ ‫جمله‬ ‫هرگاه‬ ‫ریکاردها‬where ‫رو‬ ‫به‬ ‫ها‬ ‫ریکارد‬ ‫تمام‬ ‫ننویسیم‬ ‫را‬‫ز‬ ‫ذیل‬ ‫قرار‬ ‫شد‬ ‫خواهد‬ ‫درآورده‬: • UPDATE Customers SET ContactName='Alfred Schmidt', City='Hamburg'; 2:04 AM Gharjistan University Computer Science Faculty Farah Branch 14
  • 15. SQL DELETE Statement: • The DELETE statement is used to delete records in a table. • Syntax: • DELETE FROM table_name WHERE some_column=some_value; •‫دستور‬delete‫کردن‬ ‫حذف‬ ‫برای‬ ‫بکار‬ ‫جدول‬ ‫یک‬ ‫در‬ ‫ریکاردها‬ ‫میرود‬. •‫ساختار‬: • DELETE FROM table_name WHERE some_column=some_value; 2:04 AM Gharjistan University Computer Science Faculty Farah Branch 15
  • 16. Continue… • Examples: • DELETE FROM Customers WHERE CustomerName='Alfreds Futterkiste' AND ContactName='Maria Anders'; Nangarhar University Database1 16
  • 17. Delete All Data: • It is possible to delete all rows in a table without deleting the table. This means that the table structure, attributes, and indexes will be intact: • Syntax: • DELETE FROM table_name; or DELETE * FROM table_name; •‫یک‬ ‫در‬ ‫سطرها‬ ‫تمام‬ ‫که‬ ‫است‬ ‫ممکن‬ ‫حذف‬ ‫جدول‬ ‫خود‬ ‫اینکه‬ ‫بدون‬ ‫جدول‬ ‫کرد‬ ‫حذف‬ ‫شود‬.‫که‬ ‫معنا‬ ‫این‬ ‫به‬ ‫و‬ ‫خاصه‬ ‫صفات‬ ،‫جدول‬ ‫ساختار‬ index‫باقی‬ ‫درست‬ ‫و‬ ‫ثابت‬ ‫آن‬ ‫های‬ ‫ماند‬ ‫خواهد‬. •‫ساختار‬: • DELETE FROM table_name; or DELETE * FROM table_name; Nangarhar University Database1 17
  • 18. Continue… • Note: Be very careful when deleting records. You cannot undo this statement! •‫نوت‬: •‫هاه‬ ‫ریکارد‬ ‫کردن‬ ‫حذف‬ ‫وقت‬ ‫در‬ ‫دوبا‬ ‫چونکه‬ ‫باشید‬ ‫مواظب‬ ‫بسیار‬‫ره‬ ‫را‬ ‫دستور‬ ‫این‬ ‫که‬ ‫نمیتوانید‬undo ‫کنید‬. Nangarhar University Database1 18
  • 19. 2:04 AM Gharjistan University Computer Science Faculty Farah Branch 19