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

Date and Time Differences in Oracle
How To Calculate Date and Time Differences in Oracle? If you want to know how many years, months, days and seconds are there between two dates or times, you can use the date and time interval expressions: YEAR ... TO MONTH and DAY ... TO SECOND. The tutorial exercise below gives you some good exampl...
2020-03-15, 1394🔥, 0💬

Create a New Table with SELECT Statements in Oracle
How To Create a New Table by Selecting Rows from Another Table in Oracle? Let's say you have a table with many data rows, now you want to create a backup copy of this table of all rows or a subset of them, you can use the CREATE TABLE...AS SELECT statement to do this. Here is an example script: &...
2020-02-29, 2035🔥, 0💬

ALTER TABLE - Add a New Column in Oracle
How To Add a New Column to an Existing Table in Oracle? If you have an existing table with existing data rows, and want to add a new column to that table, you can use the ALTER TABLE ... ADD statement to do this. Here is an example script: SQL&gt; connect HR/fyicenter Connected. SQL&gt; CREA...
2020-02-29, 1842🔥, 0💬

Create a New Table in Oracle
How To Create a New Table in Oracle? If you want to create a new table in your own schema, you can log into the server with your account, and use the CREATE TABLE statement. The following script shows you how to create a table: &gt;.\bin\sqlplus /nolog SQL&gt; connect HR/fyicenter Connected....
2020-02-29, 1748🔥, 0💬

Understanding SQL DDL Statements for Oracle
Where to find answers to frequently asked questions on SQL DDL Statements for Oracle? I want to start creating tables. Here is a list of frequently asked questions and their answers compiled by FYIcenter.com DBA team on SQL DDL Statements for Oracle. Clear answers are provided with tutorial exercise...
2020-02-29, 1602🔥, 0💬

What Are DDL Statements in Oracle
What Are DDL Statements in Oracle? DDL (Data Definition Language) statements are statements to create and manage data objects in the database. The are 3 primary DDL statements: CREATE - Creating a new database object. ALTER - Altering the definition of an existing data object. DROP - Dropping an exi...
2020-02-29, 1581🔥, 0💬

CREATE INDEX - Create a Table Index in Oracle
How To Create a Table Index in Oracle? If you have a table with a lots of rows, and you know that one of the columns will be used often a search criteria, you can add an index for that column to in improve the search performance. To add an index, you can use the CREATE INDEX statement as shown in th...
2020-02-20, 3109🔥, 0💬

ALTER INDEX - Rename an Index in Oracle
How To Rename an Index in Oracle? Let's say you have an existing index, and you don't like its name anymore for some reason, you can rename it with the ALTER INDEX ... RENAME TO statement. Here is an example script on how to rename an index: CREATE TABLE student (id NUMBER(5) PRIMARY KEY, first_name...
2020-02-20, 1889🔥, 0💬

ALTER TABLE - Delete a Column in Oracle
How To Delete a Column in an Existing Table in Oracle? If you have an existing column in a table and you need that column any more, you can delete it with ALTER TABLE ... DROP COLUMN statement. Here is an example SQL script: SQL&gt; CREATE TABLE emp_dept_90 2 AS SELECT * FROM employees WHERE dep...
2020-02-20, 1566🔥, 0💬

DROP TABLE Statement in Oracle
How To Drop an Existing Table in Oracle? If you want to delete an existing table and its data rows, you can use the DROP TABLE statement as shown in this script: SQL&gt; connect HR/fyicenter Connected. SQL&gt; CREATE TABLE emp_dept_10 2 AS SELECT * FROM employees WHERE department_id=10; Tabl...
2020-02-20, 1534🔥, 0💬

Drop an Existing Index in Oracle
How To Drop an Existing Index in Oracle? If you don't need an existing index any more, you should delete it with the DROP INDEX statement. Here is an example SQL script: CREATE TABLE student (id NUMBER(5) PRIMARY KEY, first_name VARCHAR(80) NOT NULL, last_name VARCHAR(80) NOT NULL, birth_date DATE N...
2020-02-20, 1496🔥, 0💬

Understanding SQL DML Statements for Oracle
Where to find answers to frequently asked questions on SQL DML Statements for Oracle. I want insert and delete data in tables. Here is a list of frequently asked questions and their answers compiled by FYIcenter.com DBA team on SQL DML Statements for Oracle. Clear answers are provided with tutorial ...
2020-02-07, 1696🔥, 0💬

Create a New View in Oracle
How To Create a New View in Oracle? You can create a new view based on one or more existing tables by using the CREATE VIEW statement as shown in the following script: CREATE VIEW employee_department AS SELECT e.employee_id, e.first_name, e.last_name, e.email, e.manager_id, d.department_name FROM em...
2020-02-07, 1607🔥, 0💬

What Are DML Statements in Oracle
What Are DML Statements in Oracle? DML (Data Manipulation Language) statements are statements to change data values in database tables. The are 3 primary DML statements: INSERT - Inserting new rows into database tables. UPDATE - Updating existing rows in database tables . DELETE - Deleting existing ...
2020-02-07, 1568🔥, 0💬

Create a Test Table for DML Testing in Oracle
How To Create a Testing Table in Oracle? If you want to practice DML statements, you should create a testing table as shown in the script below: CREATE TABLE fyi_links (id NUMBER(4) PRIMARY KEY, url VARCHAR2(80) NOT NULL, notes VARCHAR2(1024), counts NUMBER, created DATE DEFAULT (sysdate)); Table cr...
2020-02-07, 1487🔥, 0💬

Drop an Existing View in Oracle
How To Drop an Existing View in Oracle? If you have an existing view, and you don't want it anymore, you can delete it by using the DROP VIEW statement as shown in the following script: DROP VIEW employee_department; View dropped.   ⇒ Understanding SQL DML Statements for Oracle ⇐ Create a New View ...
2020-02-07, 1460🔥, 0💬

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, 2947🔥, 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, 1930🔥, 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, 1588🔥, 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, 1511🔥, 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, 1397🔥, 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, 2382🔥, 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, 1470🔥, 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, 1422🔥, 0💬

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