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

Update Values on Multiple Rows in Oracle
How To Update Values on Multiple Rows in Oracle? If the WHERE clause in an UPDATE matches multiple rows, the SET clause will be applied to all matched rows. This rule allows you to update values on multiple rows in a single UPDATE statement. Here is a good example: UPDATE fyi_links SET counts = 9, n...
2020-01-21, 1409🔥, 0💬

Update Values in a Table in Oracle
How To Update Values in a Table in Oracle? If you want to update some values in one row or multiple rows in a table, you can use the UPDATE statement. The script below shows a good example: UPDATE fyi_links SET counts = 999, notes = 'Good site.' WHERE id = 101; 1 row updated. SELECT * FROM fyi_links...
2020-01-21, 1349🔥, 0💬

Delete Multiple Rows from a Table in Oracle
How To Delete Multiple Rows from a Table in Oracle? You can delete multiple rows from a table in the same way as deleting a single row, except that the WHERE clause will match multiple rows. The tutorial exercise below deletes 3 rows from the fyi_links table: SELECT * FROM fyi_links WHERE id &gt...
2020-01-04, 1806🔥, 0💬

Understanding SQL SELECT Query Statements in Oracle
Where to find answers to frequently asked questions on SQL SELECT Query Statements in Oracle? I want to query data from tables. Here is a list of frequently asked questions and their answers compiled by FYIcenter.com DBA team on SQL SELECT Query Statements in Oracle. Clear answers are provided with ...
2020-01-04, 1629🔥, 0💬

Delete an Existing Row from a Table in Oracle
How To Delete an Existing Row from a Table in Oracle? If you want to delete an existing row from a table, you can use the DELETE statement with a WHERE clause to identify that row. Here is good sample of DELETE statements: INSERT INTO fyi_links (url, id) VALUES ('http://www.myspace.com', 301); 1 row...
2020-01-04, 1614🔥, 0💬

What Is a SELECT Query Statement in Oracle
What Is a SELECT Query Statement in Oracle? The SELECT statement is also called the query statement. It is the most frequently used SQL statement in any database application. A SELECT statement allows you to retrieve data from one or more tables, or views, with different selection criteria, grouping...
2020-01-04, 1568🔥, 0💬

in Oracle
How To Delete All Rows from a Table in Oracle? If you want to delete all rows from a table, you have two options: Use the DELETE statement with no WHERE clause. Use the TRUNCATE TABLE statement. The TRUNCATE statement is more efficient the DELETE statement. The tutorial exercise shows you a good exa...
2020-01-04, 1470🔥, 0💬

Select Some Rows from a Table in Oracle
How To Select Some Rows from a Table in Oracle? If you don't want select all rows from a table, you can specify a WHERE clause to tell the query to return only the rows that meets the condition defined in the WHERE clause. The following select statement only returns rows that has department name sta...
2019-12-19, 1844🔥, 0💬

Select Some Columns from a Table in Oracle
How To Select Some Columns from a Table in Oracle? If you want explicitly tell the query to some columns, you can specify the column names in SELECT clause. The following select statement returns only two columns from the table "departments": SQL&gt; SELECT location_id, department_name FROM DEPA...
2019-12-19, 1534🔥, 0💬

Select All Columns of All Rows in Oracle
How To Select All Columns of All Rows from a Table in Oracle? The simplest query statement is the one that selects all columns of all rows from a table: "SELECT * FROM table_name;". The (*) in the SELECT clause tells the query to return all columns. The tutorial exercise below gives you a good examp...
2019-12-19, 1460🔥, 0💬

Sort the Query Output in Oracle
How To Sort the Query Output in Oracle? If you want the returning rows to be sorted, you can specify a sorting expression in the ORDER BY clause. The following select statement returns rows sorted by the values in the "manager_id" column: SQL&gt; SELECT * FROM departments ORDER BY manager_id; DE...
2019-12-19, 1422🔥, 0💬

Query Output Sorted by Multiple Columns in Oracle
Can the Query Output Be Sorted by Multiple Columns in Oracle? You can specifying multiple columns in the ORDER BY clause as shown in the following example statement, which returns employees' salaries sorted by department and salary value: SQL&gt; SELECT department_id, first_name, last_name, sala...
2019-12-19, 1402🔥, 0💬

Count the Number of Rows with SELECT Statements in Oracle
How To Use SELECT Statement to Count the Number of Rows in Oracle? If you want to count the number of rows, you can use the COUNT(*) function in the SELECT clause. The following select statement returns the number of rows in the "department" table: SQL&gt; SELECT COUNT(*) FROM departments; COUNT...
2019-12-19, 1627🔥, 0💬

Sort Query Output in Descending Order in Oracle
How To Sort Query Output in Descending Order in Oracle? If you want to sort a column in descending order, you can specify the DESC keyword in the ORDER BY clause. The following SELECT statement first sorts the department in descending order, then sorts the salary in ascending order: SQL&gt; SELE...
2019-12-19, 1533🔥, 0💬

What Are Group Functions in Oracle
What Are Group Functions in Oracle? Group functions are functions applied to a group of rows. Examples of group functions are: COUNT(*) - Returns the number of rows in the group. MIN(exp) - Returns the minimum value of the expression evaluated on each row of the group. MAX(exp) - Returns the maximum...
2019-12-19, 1512🔥, 0💬

Use of SELECT Statements in Views in Oracle
Can SELECT Statements Be Used on Views in Oracle? Select (query) statements can used on views in the same way as tables. The following tutorial exercise helps you creating a view and running a query statement on the view: SQL&gt; CREATE VIEW managed_dept AS SELECT * FROM departments WHERE manage...
2019-12-19, 1464🔥, 0💬

Filter Out Duplications in Returning Rows in Oracle
How To Filter Out Duplications in Returning Rows in Oracle? If there are duplications in the returning rows, and you want to remove the duplications, you can use the keyword DISTINCT or UNIQUE in the SELECT clause. The tutorial exercise below shows you that DISTINCT works on selected columns only: S...
2019-12-19, 1421🔥, 0💬

Concatenate Two Text Values in Oracle
How To Concatenate Two Text Values in Oracle? There are two ways to concatenate two text values together: CONCAT() function. '||' operation. Here is some examples on how to use them: SELECT 'FYI' || 'Center' || '.com' FROM DUAL; FYICenter.com SELECT CONCAT('FYICenter','.com') FROM DUAL; FYICenter.co...
2019-12-02, 2116🔥, 0💬

What Is NULL Value in Oracle
What Is NULL Value in Oracle? NULL is a special value representing "no value" in all data types. NULL can be used on in operations like other values. But most operations has special rules when NULL is involved. The tutorial exercise below shows you some examples: SET NULL 'NULL'; -- Make sure NULL i...
2019-12-02, 1969🔥, 0💬

Convert Times to Character Strings in Oracle
How To Convert Times to Character Strings in Oracle? You can convert dates to characters using the TO_CHAR() function as shown in the following examples: SELECT TO_CHAR(SYSDATE, 'HH:MI:SS') FROM DUAL; 04:49:49 SELECT TO_CHAR(SYSDATE, 'HH24:MI:SS.FF') FROM DUAL; -- Error: SYSDATE has no fractional se...
2019-12-02, 1788🔥, 0💬

Convert Character Strings to Times in Oracle
How To Convert Character Strings to Times in Oracle? You can convert dates to characters using the TO_CHAR() function as shown in the following examples: SELECT TO_CHAR(TO_DATE('04:49:49', 'HH:MI:SS'), 'DD-MON-YYYY HH24:MI:SS') FROM DUAL; -- Default date is the first day of the current month 01-MAY-...
2019-12-02, 1540🔥, 0💬

Use NULL as Conditions in Oracle
How To Use NULL as Conditions in Oracle? If you want to compare values against NULL as conditions, you should use the "IS NULL" or "IS NOT NULL" operator. Do not use "=" or "&lt;&gt;" against NULL. The sample script below shows you some good examples: SELECT 'A' IS NULL FROM DUAL; -- Error: ...
2019-12-02, 1530🔥, 0💬

Divide Query Output into Groups in Oracle
How To Divide Query Output into Groups in Oracle? You can divide query output into multiple groups with the GROUP BY clause. It allows you specify a column as the grouping criteria, so that rows with the same value in the column will be considered as a single group. When the GROUP BY clause is speci...
2019-11-21, 1692🔥, 0💬

Group Functions Used with Non-group Selection Fields in Oracle
Can Group Functions Be Mixed with Non-group Selection Fields in Oracle? If a group function is used in the SELECT clause, all other selection fields must be group level fields. Non-group fields can not be mixed with group fields in the SELECT clause. The script below gives you an example of invalid ...
2019-11-21, 1630🔥, 0💬

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