1.
SELECT * FROM table name
Select DISTINCT query list from table name//Redo Query
2. Conditional query
Select query list from table name where filter criteria;
SELECT * FROM Employees where salary>12000;
Select Last_Name, department_id from Emplyees where department_id!=90;
Select last_name,salary,commission_pct from Emplyees where salary>=10000 and salary<=20000;
SELECT * FROM employees where last_name like '%a% ';
SELECT * FROM employees where last_name like ' ___e_a% ';
SELECT * FROM employees where last_name like ' _\_% '; The 2nd character is _, which requires the function escape character \.
SELECT * FROM employees where last_name like ' _$_% ' escape ' $ ';
Filter by conditional expression:
Conditional operator:> < =! = <> >= <=
Filter by logical expression:
Function: Used to join conditional expressions
&& and: Two conditions are true, the result is true, and vice versa is False
|| And OR:
Logical operators: && | | ! And Or not
Fuzzy query:
Like (with wildcard character with% 0 or any number of characters, _ any single character) between and in are NULL is NOT NULL
SQL query Statement