< 1 2 3 >   Sort: Date

How To Specify Default Values in INSERT Statement
How To Specify Default Values in INSERT Statement? - Oracle DBA FAQ - Understanding SQL DML Statements 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 g...
2007-04-21, 5154👍, 0💬

How To Use Regular Expression in Pattern Match Conditions
How To Use Regular Expression in Pattern Match Conditions? - Oracle DBA FAQ - Understanding SQL Basics If you have a pattern that is too complex for LIKE to handle, you can use the regular expression pattern patch function: REGEXP_LIKE(). The following script provides you some good examples: SELECT ...
2007-04-22, 5151👍, 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, 5129👍, 0💬

What Are DML Statements
What Are DML Statements? - Oracle DBA FAQ - Understanding SQL DML Statements 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 dat...
2007-04-22, 5120👍, 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, 5120👍, 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, 5092👍, 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, 5082👍, 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, 5079👍, 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, 5069👍, 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, 5038👍, 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, 5034👍, 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, 5033👍, 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, 5023👍, 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, 4983👍, 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, 4954👍, 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, 4949👍, 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, 4939👍, 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, 4934👍, 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, 4921👍, 0💬

How To Create a Testing Table
How To Create a Testing Table? - Oracle DBA FAQ - Understanding SQL DML Statements 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,...
2007-04-22, 4920👍, 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, 4915👍, 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, 4901👍, 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, 4882👍, 0💬

What Are the Differences between CHAR and VARCHAR2
What Are the Differences between CHAR and VARCHAR2? - Oracle DBA FAQ - Understanding SQL Basics The main differences between CHAR and VARCHAR2 are: CHAR stores values in fixed lengths. Values are padded with space characters to match the specified length. VARCHAR2 stores values in variable lengths. ...
2007-04-24, 4860👍, 0💬

< 1 2 3 >   Sort: Date