< 1 2 3 >   Sort: Date

How To Use Values from Other Tables in UPDATE Statements
How To Use Values from Other Tables in UPDATE Statements? - Oracle DBA FAQ - Understanding SQL DML Statements 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 ma...
2007-04-21, 4826👍, 0💬

How To Convert Times to Characters
How To Convert Times to Characters? - Oracle DBA FAQ - Understanding SQL Basics 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: S...
2007-04-23, 4816👍, 0💬

What Are the Oracle Built-in Data Types
What Are the Oracle Built-in Data Types? - Oracle DBA FAQ - Understanding SQL Basics There are 20 Oracle built-in data types, divided into 6 groups: Character Datatypes - CHAR, NCHAR, NVARCHAR2, VARCHAR2 Number Datatypes - NUMBER, BINARY_FLOAT, BINARY_DOUBLE Long and Row Datatypes - LONG, LONG RAW, ...
2007-04-24, 4811👍, 0💬

How To Create a New Table by Selecting Rows from Another Table
How To Create a New Table by Selecting Rows from Another Table? - Oracle DBA FAQ - Understanding SQL DDL Statements 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 t...
2007-04-22, 4810👍, 0💬

How To Add a New Column to an Existing Table
How To Add a New Column to an Existing Table? - Oracle DBA FAQ - Understanding SQL DDL Statements 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> connect HR/fy...
2007-04-22, 4799👍, 0💬

How To Convert Dates to Characters
How To Convert Dates to Characters? - Oracle DBA FAQ - Understanding SQL Basics You can convert dates to characters using the TO_CHAR() function as shown in the following examples: SELECT TO_CHAR(SYSDATE, 'DD-MON-YYYY') FROM DUAL; -- SYSDATE returns the current date 07-MAY-2006 SELECT TO_CHAR(SYSDAT...
2007-04-23, 4785👍, 0💬

What Are the Differences between DATE and TIMESTAMP
What Are the Differences between DATE and TIMESTAMP? - Oracle DBA FAQ - Understanding SQL Basics The main differences between DATE and TIMESTAMP are: DATE stores values as century, year, month, date, hour, minute, and second. TIMESTAMP stores values as year, month, day, hour, minute, second, and fra...
2007-04-24, 4776👍, 0💬

How To Write Numeric Literals
How To Write Numeric Literals? - Oracle DBA FAQ - Understanding SQL Basics Numeric literals can coded as shown in the following samples: SELECT 255 FROM DUAL -- An integer 255 SELECT -6.34 FROM DUAL -- A regular number -6.34 SELECT 2.14F FROM DUAL -- A single-precision floating point 2.14 SELECT -0....
2007-04-24, 4776👍, 0💬

How To Update Values in a Table
How To Update Values in a Table? - Oracle DBA FAQ - Understanding SQL DML Statements 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 = 1...
2007-04-21, 4764👍, 0💬

What Is SQL
What Is SQL? - Oracle DBA FAQ - Understanding SQL Basics SQL, SEQUEL (Structured English Query Language), is a language for RDBMS (Relational Database Management Systems). SQL was developed by IBM Corporation.
2007-04-24, 4741👍, 0💬

How To Write Date and Time Literals
How To Write Date and Time Literals? - Oracle DBA FAQ - Understanding SQL Basics Date and time literals can coded as shown in the following samples: SELECT DATE '2002-10-03' FROM DUAL -- ANSI date format 03-OCT-02 SELECT TIMESTAMP '1997-01-31 09:26:50.124' FROM DUAL 31-JAN-97 09.26.50.124000000 AM -...
2007-04-24, 4740👍, 0💬

What Are the ANSI Data Types Supported in Oracle
What Are the ANSI Data Types Supported in Oracle? - Oracle DBA FAQ - Understanding SQL Basics The following ANSI data types are supported in Oracle: CHARACTER(n) / CHAR(n) CHARACTER VARYING(n) / CHAR VARYING(n) NATIONAL CHARACTER(n) / NATIONAL CHAR(n) / NCHAR(n) NATIONAL CHARACTER VARYING(n) / NATIO...
2007-04-24, 4737👍, 0💬

How To Write Text Literals
How To Write Text Literals? - Oracle DBA FAQ - Understanding SQL Basics There are several ways to write text literals as shown in the following samples: SELECT 'FYICenter.com' FROM DUAL -- The most common format FYICenter.com SELECT 'It''s Sunday!' FROM DUAL -- Single quote escaped It's Sunday! SELE...
2007-04-24, 4714👍, 0💬

How To Use Existing Values in UPDATE Statements
How To Use Existing Values in UPDATE Statements? - Oracle DBA FAQ - Understanding SQL DML Statements 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 ...
2007-04-21, 4712👍, 0💬

How To Convert Characters to Dates
How To Convert Characters to Dates? - Oracle DBA FAQ - Understanding SQL Basics You can convert dates to characters using the TO_DATE() function as shown in the following examples: SELECT TO_DATE('07-MAY-2006', 'DD-MON-YYYY') FROM DUAL; 07-MAY-06 SELECT TO_DATE('2006/05/07 ', 'YYYY/MM/DD') FROM DUAL...
2007-04-23, 4687👍, 0💬

How Many Categories of Data Types
How Many Categories of Data Types? - Oracle DBA FAQ - Understanding SQL Basics Oracles supports the following categories of data types: Oracle Built-in Datatypes. ANSI, DB2, and SQL/DS Datatypes. User-Defined Types. Oracle-Supplied Types.
2007-04-24, 4679👍, 0💬

How To Delete a Column in an Existing Table
How To Delete a Column in an Existing Table? - Oracle DBA FAQ - Understanding SQL DDL Statements 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> CREATE TABLE emp_dept_90 2 A...
2007-04-22, 4670👍, 0💬

How To Convert Numbers to Characters
How To Convert Numbers to Characters? - Oracle DBA FAQ - Understanding SQL Basics You can convert numeric values to characters by using the TO_CHAR() function as shown in the following examples: SELECT TO_CHAR(4123.4570) FROM DUAL 123.457 SELECT TO_CHAR(4123.457, '$9,999,999.99') FROM DUAL $4,123.46...
2007-04-23, 4665👍, 0💬

How To Insert a New Row into a Table
How To Insert a New Row into a Table? - Oracle DBA FAQ - Understanding SQL DML Statements 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',...
2007-04-21, 4654👍, 0💬

How To Drop an Index
How To Drop an Index? - Oracle DBA FAQ - Understanding SQL DDL Statements 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 VARCHA...
2007-04-22, 4639👍, 0💬

How To Convert Characters to Times
How To Convert Characters to Times? - Oracle DBA FAQ - Understanding SQL Basics 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 o...
2007-04-23, 4633👍, 0💬

How To Create a New Table
How To Create a New Table? - Oracle DBA FAQ - Understanding SQL DDL Statements 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: >.\bin\sqlplus /nolog SQL> con...
2007-04-22, 4627👍, 0💬

How To Create a New View
How To Create a New View? - Oracle DBA FAQ - Understanding SQL DDL Statements 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.emai...
2007-04-22, 4622👍, 0💬

How To Omit Columns with Default Values in INSERT Statement
How To Omit Columns with Default Values in INSERT Statement? - Oracle DBA FAQ - Understanding SQL DML Statements 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 colum...
2007-04-21, 4617👍, 0💬

< 1 2 3 >   Sort: Date