SQL Day 2
SQL Day 2
AND clause.
• USING ORDER BY
• Syntax:
• select * from <table_name> ORDER BY < col> DESC <ASC>;
Arithmetic operators -- highest precedence
• +, -, *, / (select nsal,nsal+20 from nani)
Comparison operators
=, !=, >, <, >=, <=, <> (select * from nani where nno!=12; )
between, not between
in, not in
null, not null (select * from nani where nno is not null;)
like (select * from nani where nname like 'kani')
Logical operators
And (select * from nani where nno=12 and nname='kani';)
Or -- lowest precedence
not
FUNCTIO
NS
Two types
of SQL
functions