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.
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.
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