<< < 2 3 4 5 6 7 8 9 10 11 12 > >>   ∑:464  Sort:Rank

Use Group Functions in the SELECT Clause in Oracle
How To Use Group Functions in the SELECT Clause in Oracle? If group functions are used in the SELECT clause, they will be used on the rows that meet the query selection criteria, the output of group functions will be returned as output of the query. The following select statement returns 4 values ca...
2019-11-21, 1521🔥, 0💬

Count Duplicated Values in a Column in Oracle
How To Count Duplicated Values in a Column in Oracle? If you have a column with duplicated values, and you want to know what are those duplicated values are and how many duplicates are there for each of those values, you can use the GROUP BY ... HAVING clause as shown in the following example. It re...
2019-11-21, 1436🔥, 0💬

Apply Filtering Criteria at Group Level in Oracle
How To Apply Filtering Criteria at Group Level in Oracle? If you want to return only specific groups from the query, you can apply filtering criteria at the group level by using the HAVING clause inside the GROUP BY clause. The following script gives you a good HAVING example: SQL&gt; SELECT dep...
2019-11-21, 1418🔥, 0💬

Query with an Inner Join in Oracle
How To Write a Query with an Inner Join in Oracle? If you want to query from two tables with an inner join, you can use the INNER JOIN ... ON clause in the FROM clause. The following query returns output with an inner join from two tables: employees and departments. The join condition is that the de...
2019-10-27, 1682🔥, 0💬

Use Multiple Columns in GROUP BY in Oracle
Can Multiple Columns Be Used in GROUP BY in Oracle? You can use multiple columns in the GROUP BY clause as shown in the following example. It returns how many employees are having the same salary in each department: SQL&gt; SELECT department_id, salary, count(*) 2 FROM employees GROUP BY departm...
2019-10-27, 1666🔥, 0💬

Define and Use Table Alias Names in Oracle
How To Define and Use Table Alias Names in Oracle? When column names need to be prefixed with table names, you can define table alias name and use them to prefix column names as shown in the following select statement: SQL&gt; SELECT e.first_name, e.last_name, d.department_name FROM employees e ...
2019-10-27, 1571🔥, 0💬

Use Group Functions in ORDER BY Clause in Oracle
Can Group Functions Be Used in the ORDER BY Clause in Oracle? If the query output is aggregated as groups, you can sort the groups by using group functions in the ORDER BY clause. The following statement returns how many employees are having the same salary in each department. The group output is so...
2019-10-27, 1531🔥, 0💬

Ways to Join Two Tables in a Single Query in Oracle
How To Join Two Tables in a Single Query in Oracle? Two tables can be joined together in a query in 4 ways: Inner Join: Returns only rows from both tables that satisfy the join condition. Left Outer Join: Returns rows from both tables that satisfy the join condition, and the rest of rows from the fi...
2019-10-27, 1512🔥, 0💬

Query with a Left Outer Join in Oracle
How To Write a Query with a Left Outer Join in Oracle? If you want to query from two tables with a left outer join, you can use the LEFT OUTER JOIN ... ON clause in the FROM clause. The following query returns output with a left outer join from two tables: departments and employees. The join conditi...
2019-10-18, 1655🔥, 0💬

Inner Join with the WHERE Clause in Oracle
How To Write an Inner Join with the WHERE Clause in Oracle? If you don't want to use the INNER JOIN ... ON clause to write an inner join, you can put the join condition in the WHERE clause as shown in the following query example: SQL&gt; SELECT d.department_name, e.first_name, e.last_name 2 FROM...
2019-10-18, 1618🔥, 0💬

Query with a Full Outer Join in Oracle
How To Write a Query with a Full Outer Join in Oracle? If you want to query from two tables with a full outer join, you can use the FULL OUTER JOIN ... ON clause in the FROM clause. The following query returns output with a full outer join from two tables: departments and employees. The join conditi...
2019-10-18, 1607🔥, 0💬

Left Outer Join with the WHERE Clause in Oracle
How To Write a Left Outer Join with the WHERE Clause in Oracle? If you don't want to use the LEFT OUTER JOIN ... ON clause to write a left outer join, you can use a special criteria in the WHERE clause as "left_table.column = right_table.column(+)". The select statement below is an example of a left...
2019-10-18, 1512🔥, 0💬

Query with a Right Outer Join in Oracle
How To Write a Query with a Right Outer Join in Oracle? If you want to query from two tables with a right outer join, you can use the RIGHT OUTER JOIN ... ON clause in the FROM clause. The following query returns output with a right outer join from two tables: departments and employees. The join con...
2019-10-18, 1506🔥, 0💬

What Is a Subquery in Oracle
What Is a Subquery in Oracle? A subquery is a SELECT statement used as part of the selection criteria of the main SELECT statement. The subquery specified in the WHERE clause will be evaluated repeated on each row of the selection base table. The output of the subquery will be used in the final eval...
2019-09-27, 1809🔥, 0💬

Name Query Output Columns in Oracle
How To Name Query Output Columns in Oracle? Each column in the query output has a default name. If you don't like the default name, you can specify a new name for any column in the query output by using the AS clause. The following statement shows you a good example: SQL&gt; SELECT department_id...
2019-09-27, 1762🔥, 2💬

💬 2019-09-19 Aninda mahadev: Good Tutorial!!!

Use Subqueries with the EXISTS Operator in Oracle
How To Use Subqueries with the EXISTS Operator in Oracle? A subquery can be used with the EXISTS operator as "EXISTS (subquery)", which returns true if the subquery returns one or more rows. The following statement is a good example of "EXISTS (subquery)". It returns rows from employees table that t...
2019-09-27, 1588🔥, 0💬

Use Subqueries in the FROM Clause in Oracle
How To Use Subqueries in the FROM Clause in Oracle? If you have a query returning many rows of data, and you want to perform another query on those rows, you can put the first query as a subquery in the FROM clause of the second query. The following statement shows you how to use a subquery as base ...
2019-09-27, 1511🔥, 0💬

Use Subqueries with the IN Operator in Oracle
How To Use Subqueries with the IN Operator in Oracle? A subquery can be used with the IN operator as "expression IN (subquery)". The subquery should return a single column with one or more rows to form a list of values to be used by the IN operation. The following tutorial exercise shows you how to ...
2019-09-27, 1496🔥, 0💬

Understanding SQL Transaction Management in Oracle
Where to find answers to frequently asked questions on SQL Transaction Management in Oracle? Here is a list of frequently asked questions and their answers compiled by FYIcenter.com DBA team on SQL Transaction Management in Oracle. Clear answers are provided with tutorial exercises on starting and e...
2019-09-16, 2698🔥, 0💬

Return Top 5 Rows in Oracle
How To Return Top 5 Rows in Oracle? If you want the query to return only the first 5 rows, you can use the pseudo column called ROWNUM in the WHERE clause. ROWNUM contains the row number of each returning row from the query. The following statement returns the first 5 rows from the employees table: ...
2019-09-16, 1909🔥, 0💬

Ways to Start a New Transaction in Oracle
How To Start a New Transaction in Oracle? There is no SQL statement to explicitly start a new transaction. Oracle server implicitly starts a new transaction with the following two conditions: The first executable statement of a new user session will automatically start a new transaction. The first e...
2019-09-16, 1772🔥, 0💬

Counting Groups Returned with the GROUP BY Clause in Oracle
How To Count Groups Returned with the GROUP BY Clause in Oracle? If you use the COUNT(*) function on groups returned with the GROUP BY clause, it will count the number of rows within each group, not the number of groups. If you want to count the number of groups, you can put the GROUP BY query into ...
2019-09-16, 1580🔥, 0💬

What Is a Transaction in Oracle
What Is a Transaction in Oracle? A transaction is a logical unit of work requested by a user to be applied to the database objects. Oracle server introduces the transaction concept to allow users to group one or more SQL statements into a single transaction, so that the effects of all the SQL statem...
2019-09-16, 1501🔥, 0💬

Create a Test Table for Transaction Testing in Oracle
How To Create a Test Table for Transaction Testing in Oracle? If you want to practice DML statements, you should create a testing table as shown in the script below: &gt;cd (OracleXE home directory) &gt;.\bin\sqlplus /nolog SQL&gt; connect HR/fyicenter Connected. SQL&gt; CREATE TABLE...
2019-09-04, 2163🔥, 0💬

<< < 2 3 4 5 6 7 8 9 10 11 12 > >>   ∑:464  Sort:Rank