Here is an example SQL that retrieves data from EMPLOYEE table with employee’s ID code in EMP_SUBSIDIARY table. select * from employee a where...
The following is an example shows a SQL statement with two potential table join paths. “Employee to Department” and “Department to Employee” are...
Here is an example SQL that retrieves data from EMPLOYEE table with “emp_id < 710000” and employee’s department code exists in DEPARTMENT table....
The following is an example shows a SQL statement with a variable on the IN List operator. The SQL retrieve records from EMPLOYEE table that...
Semi-join is introduced in Oracle 8.0. It provides an efficient method of performing a WHERE EXISTS or WHERE IN sub-queries. A semi-join returns...
The LIKE is a logical operator that determines if a character string matches a specified pattern. A pattern may include regular characters and...
The following is an example shows a DELETE SQL statement with subquery. The SQL delete records from emp_subsidiary that should satisfy with three...
Here the following is SQL statement with multiple OR subqueries. SELECT * FROM employee WHERE emp_id IN (SELECT emp_id FROM emp_subsidiary where...
The following is an example shows a SQL statement with “Group by” expression. The SQL retrieve the sum of historical salary from table...
Here the following is a simple SQL statement with a CASE expression syntax. SELECT * FROM employee WHERE CASE WHEN emp_salary< 1000 THEN 'low'...
Here the following is a simple SQL statement with a “< ALL (Subquery)” syntax. SELECT * FROM employee a WHERE a.emp_salary <ALL(SELECT...
Here the following is a very simple SQL statement with two Max() functions in select list. select max(emp_salary),max(emp_id) from employee;...
The following is an example shows a SQL statement with “Not Exists” expression. The SQL retrieve records from emp_subsidiary that satisfy with the...
It is common that the performance is not good if a SQL statement with OR conditions. Let’s have an example show you how to tune those SQL...
Index is used to find data from the table quickly. An index is created on views and tables. It is similar to the book index. If you apply index it...
A SQL statement with multiple aggregation functions like the following and the emps_salary and emps_id are indexed. If you find the SQL is slow...
What is machine tuning for SQL statements? Tosska SQL Tuning Expert is a SQL tuning tool that optimizes your SQL statements without the need of...
Separate names with a comma.