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

sql2

The document outlines SQL syntax for data retrieval, including the use of SELECT, WHERE, and various conditions like BETWEEN, IN, AND/OR, and IS NULL. It explains the use of the DUAL table for operations without a defined table and provides examples for each SQL command. Additionally, it briefly mentions pattern searching with wildcards.

Uploaded by

surajpandeyfff54
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views

sql2

The document outlines SQL syntax for data retrieval, including the use of SELECT, WHERE, and various conditions like BETWEEN, IN, AND/OR, and IS NULL. It explains the use of the DUAL table for operations without a defined table and provides examples for each SQL command. Additionally, it briefly mentions pattern searching with wildcards.

Uploaded by

surajpandeyfff54
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

DATARETRIEVAL LAMGAACR

1 Syntax SELECTeLaoumn name ROM table name>,


2 Order oforeuton from MGHTtolf 1
3 Q (an we use SFLECTkeyword without usng FROM dlause?
1 Yes, uSing DUAL labies
2 Dual tabies are dummy tables created by MySQL, help users to do certan obyous actions without retet t
detined tables
3 eg.SELECTSS +1,
SELECT now).
SEIT UKase), ete
4. WHERE
Reduce rows based on given conditions
2 Eg. SELECT* FROM Customet WhHERE age 18,
BETWEEN
SELECT* FROM (ustomer WHERE age between 0AND 100,
in the above eg. 0and 100 are ncdusve
6. IN
Reduces OR Conditios,
eg. SELECT FROM oftcers WERE oficer name iN(Lakshay Hahaaa Pratap, Deepika?)
7 AND/ORINOT
AND WHERE Condl AND CONd?
CR WHERE Condi OR (ond?
NOT WHERE col name NOT IN(12.34).
8 IS NULL
eg SiT'ROA Custormer VHERE prme status s NUU,
9 Pattern Search1ng / Wildcard (%, ' )
ftofhatter from 0ton Simlar to'astesk nfrh
fiy

You might also like