1 2 3 4 5 6 > >>   Sort: Rank

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, 667👍, 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, 663👍, 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, 584👍, 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, 549👍, 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, 522👍, 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> SELECT location_id, department_name FROM DEPA...
2019-12-19, 559👍, 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, 553👍, 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, 553👍, 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> SELECT * FROM departments ORDER BY manager_id; DE...
2019-12-19, 541👍, 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> SELECT department_id, first_name, last_name, sala...
2019-12-19, 503👍, 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, 617👍, 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> SELECT COUNT(*) FROM departments; COUNT...
2019-12-19, 616👍, 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, 551👍, 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> CREATE VIEW managed_dept AS SELECT * FROM departments WHERE manage...
2019-12-19, 548👍, 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> SELE...
2019-12-19, 533👍, 0💬

Unicode Character String Literals in SQL Server Transact-SQL
How To Enter Unicode Character String Literals in SQL Server Transact-SQL? Unicode characters are multi-byte characters. They are very hard to be entered as string literals, because it requires: The SQL client tool to support Unicode characters. The command line tool 'sqlcmd' does not support Unicod...
2019-12-05, 3650👍, 1💬

💬 2019-12-05 gopala krishna: gopala krishna

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, 1096👍, 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, 688👍, 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, 685👍, 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, 653👍, 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 "<>" against NULL. The sample script below shows you some good examples: SELECT 'A' IS NULL FROM DUAL; -- Error: ...
2019-12-02, 650👍, 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, 672👍, 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, 668👍, 0💬

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, 622👍, 0💬

1 2 3 4 5 6 > >>   Sort: Rank