There may be some business requirements that need to compare concatenate strings and column with a given unknown length of the bind variable....
Here the following is an example SQL statement with a DECODE expression syntax. select * from employee where decode(emp_dept, 'AAA',...
The following is an example shows a SQL statement with two conditions “emp_dept=dpt_id and emp_dept<'L'” . select * from employee, department...
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...
https://www.linkedin.com/in/richard-to-6a93707b/
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 following is an example shows a SQL statement with two union operator in a subquery. The SQL retrieve records from EMPLOYEE table that EMP_ID...
I try my best to understand your SQL, you may try this, the key factor is that whether the grouping of `t_idiotita`.`cnt_gr_id` is applicable, it...
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...
Give you an example here: select a,group_concat(concat(b,' ',c)) from (select emp_dept as a,emp_grade as b,group_concat(distinct emp_sex...
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...
I showed you how to tune an Update statement with a simple subquery in my last blog, a more complex update statement will be discussed in the...
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;...
Separate names with a comma.