SQL-Basic-Cheat-Sheet
SQL-Basic-Cheat-Sheet
SQL
asi Query
B c
SQL Basic Cheat Sheet LL, ND, N , ET EEN, E ISTS, IN, LIKE, NOT, O , SOME
* E p b _ L
Output: Output:
A A A Y B W X R
Smith A nalyst 55000 Analyst Select from m loyee here Designation L K %a%
* E p W I E '
Consider the above table for all D Salary >
the examples given in the cheat Numeric String Date Jason Designer 75000 Designer AN 50000
SQL Commands =, >, <, >=, <=, <>,LIKE, IN Select from m loyee
* E p
Select from m loyee here Designation L K %a%
* E p W I E '
:
Jason Designer 75000
Create, Alter, Update, Insert, Select Grant, Revoke Smith A nalyst 55000
A n rea
d Sales 35000
Drop, Truncate Delete E mp_Name Designation Salary Jason Designer 75000
ample ample ample ample Smith nalyst Sort the employees table in
asi Filtering Query
Ex : Ex : Ex : Ex : A 55000
(m E ame
p_N 35000 w here my T db O
r er y Salary D SC W The here cla se is se to
: w u u d
Output
25 = 25000 'u 1'@'
Designation t ';
Output :
Get the employees records whose
salary is 55000
:
Char( ), Salary
25
nt)
I Select from m loyee
* E p E mp_Name Designation Salary
W here Designation L K %a% I E ' ' Select from m loyee
* E p
n rea Sales
Smith nalyst
A d 35000
Dro ta lep b A 55000
Em loyeep