<< < 4 5 6 7 8 9 10 11 12 13 14 > >>   ∑:1233  Sort:Rank

Set Up SQL*Plus Output Format in Oracle
How To Set Up SQL*Plus Output Format in Oracle? If you want to practice SQL statements with SQL*Plus, you need to set up your SQL*Plus output formatting parameter properly. The following SQL*Plus commands shows you some examples: COLUMN id FORMAT 9999; COLUMN url FORMAT A24; COLUMN notes FORMAT A12;...
2020-01-29, 2913🔥, 0💬

Insert Multiple Rows with 1 INSERT Statement in Oracle
How To Insert Multiple Rows with One INSERT Statement in Oracle? If you want to insert multiple rows with a single INSERT statement, you can use a subquery instead of the VALUES clause. Rows returned from the subquery will be inserted the target table. The following tutorial exercise gives a good ex...
2020-01-29, 1896🔥, 0💬

Insert a New Row into a Table in Oracle
How To Insert a New Row into a Table in Oracle? To insert a new row into a table, you should use the INSERT INTO statement with values specified for all columns as shown in the following example: INSERT INTO fyi_links VALUES (101, 'http://dev.fyicenter.com', NULL, 0, '30-Apr-2006'); 1 row created. S...
2020-01-29, 1566🔥, 0💬

Omit Columns in INSERT Statements in Oracle
How To Omit Columns with Default Values in INSERT Statement in Oracle? If you don't want to specify values for columns that have default values, or you want to specify values to columns in an order different than how they are defined, you can provide a column list in the INSERT statement. If a colum...
2020-01-29, 1493🔥, 0💬

Specify Default Values in INSERT Statements in Oracle
How To Specify Default Values in INSERT Statement in Oracle? If a column is defined with a default value in a table, you can use the key word DEFAULT in the INSERT statement to take the default value for that column. The following tutorial exercise gives a good example: INSERT INTO fyi_links VALUES ...
2020-01-29, 1378🔥, 0💬

Error: Single-Row Subquery Returns More Than One Row in Oracle
What Happens If the UPDATE Subquery Returns Multiple Rows in Oracle? If a subquery is used in a UPDATE statement, it must return exactly one row for each row in the update table that matches the WHERE clause. If it returns multiple rows, Oracle server will give you an error message. To test this out...
2020-01-21, 2354🔥, 0💬

Use Values from Other Tables in UPDATE in Oracle
How To Use Values from Other Tables in UPDATE Statements in Oracle? If you want to update values in one with values from another table, you can use a subquery in the SET clause. The subquery should return only one row for each row in the update table that matches the WHERE clause. The tutorial exerc...
2020-01-21, 1445🔥, 0💬

Use Existing Column Values in SET Clause in Oracle
How To Use Existing Values in UPDATE Statements in Oracle? If a row matches the WHERE clause in a UPDATE statement, existing values in this row can be used in expressions to provide new values in the SET clause. Existing values are represented by columns in the expressions. The tutorial exercise bel...
2020-01-21, 1409🔥, 0💬

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, 1391🔥, 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, 1328🔥, 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, 1793🔥, 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, 1608🔥, 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, 1590🔥, 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, 1546🔥, 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, 1443🔥, 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, 1815🔥, 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, 1509🔥, 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, 1444🔥, 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, 1390🔥, 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, 1382🔥, 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, 1592🔥, 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, 1492🔥, 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, 1482🔥, 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, 1446🔥, 0💬

<< < 4 5 6 7 8 9 10 11 12 13 14 > >>   ∑:1233  Sort:Rank