<< < 2 3 4 5 6 7 8 9 10 11 12 > >>   Sort: Date

How Many Types of Cursors Supported in PL/SQL
How Many Types of Cursors Supported in PL/SQL? - Oracle DBA FAQ - Working with Cursors in PL/SQL PL/SQL supports two types of cursors: The implicit cursor - A single default cursor that automatically connects to the last DML statement executed. Explicit cursors - User defined cursors with specific D...
2007-04-29, 5617👍, 0💬

How To Create a Single Index for Multiple Columns
How To Create a Single Index for Multiple Columns? - Oracle DBA FAQ - Managing Oracle Table Indexes If you know a group of multiple columns will be always used together as search criteria, you should create a single index for that group of columns with the "ON table_name(col1, col2, ...)" clause. He...
2007-04-27, 5617👍, 0💬

How To Import One Table Back from a Dump File
How To Import One Table Back from a Dump File? - Oracle DBA FAQ - Loading and Exporting Data If you only want to import one table back to the database, you can use a dump file that was created by full export, schema export or a table export. The following tutorial exercise shows you how to import th...
2007-05-02, 5615👍, 0💬

How To Count Groups Returned with the GROUP BY Clause
How To Count Groups Returned with the GROUP BY Clause? - Oracle DBA FAQ - Understanding SQL SELECT Query Statements If you use the COUNT(*) function on groups returned with the GROUP BY clause, it will count the number of rows within each group, not the number of groups. If you want to count the num...
2007-04-19, 5614👍, 0💬

What Are the Restrictions on External Table Columns
What Are the Restrictions on External Table Columns? - Oracle DBA FAQ - Loading and Exporting Data When creating external table columns, you need to watch out some restrictions: "PRIMARY KEY" is not allowed. "NOT NULL" is not allowed. "DEFAULT value" is not allowed.
2007-04-30, 5612👍, 0💬

What Is a Function
What Is a Function? - Oracle DBA FAQ - Understanding PL/SQL Language Basics A function is a named program unit. It consists of three parts: Declaration Part - Defining the function name, calling parameters, return value type, local variables and local procedures. Declaration part is required. Execut...
2007-04-30, 5610👍, 0💬

How To Write a Left Outer Join with the WHERE Clause
How To Write a Left Outer Join with the WHERE Clause? - Oracle DBA FAQ - Understanding SQL SELECT Query Statements If you don't want to use the LEFT OUTER JOIN ... ON clause to write a left outer join, you can use a special criteria in the WHERE clause as "left_table.column = right_table.column(+)"....
2007-04-19, 5608👍, 0💬

How To Use "OUT" Parameter Properly
How To Use "OUT" Parameter Properly? - Oracle DBA FAQ - Creating Your Own PL/SQL Procedures and Functions Here are the rules about OUT parameters: A formal OUT parameter acts like an un-initialized variable. It must be assigned with new values before the end of the procedure or function. An actual O...
2007-04-21, 5606👍, 0💬

How To Set a Transaction To Be READ ONLY
How To Set a Transaction To Be READ ONLY? - Oracle DBA FAQ - Understanding SQL Transaction Management If you want a transaction to be set as READ ONLY, you need to the transaction with the SET TRANSACTION READ ONLY statement. Note that a DML statement will start the transaction automatically. So you...
2007-04-17, 5601👍, 0💬

How To Use NULL as Conditions
How To Use NULL as Conditions? - Oracle DBA FAQ - Understanding SQL Basics 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 "&lt;>" against NULL. The sample script below shows you some good examples: SELECT 'A' IS...
2007-04-23, 5598👍, 0💬

How To Write a Query with a Left Outer Join
How To Write a Query with a Left Outer Join? - Oracle DBA FAQ - Understanding SQL SELECT Query Statements If you want to query from two tables with a left outer join, you can use the LEFT OUTER JOIN ... ON clause in the FROM clause. The following query returns output with a left outer join from two ...
2007-04-19, 5596👍, 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, 5595👍, 0💬

Can SELECT Statements Be Used on Views
Can SELECT Statements Be Used on Views? - Oracle DBA FAQ - Understanding SQL SELECT Query Statements 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_de...
2007-04-20, 5594👍, 0💬

How To Get Execution Path Reports on Query Statements
How To Get Execution Path Reports on Query Statements? - Oracle DBA FAQ - Introduction to Command-Line SQL*Plus Client Tool If your user account has autotrace configured by the DBA, you can use the "SET AUTOTRACE ON EXPLAIN" command to turn on execution path reports on query statements. The tutorial...
2007-04-30, 5590👍, 0💬

How To Delete All Rows a Table
How To Delete All Rows a Table? - Oracle DBA FAQ - Understanding SQL DML Statements 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 t...
2007-04-21, 5587👍, 0💬

Where Is the Export Dump File Located
Where Is the Export Dump File Located? - Oracle DBA FAQ - Loading and Exporting Data If you are not specifying the dump directory and file name, the dump file will be stored in the default dump directory with the default file name. The tutorial exercise below tells you find what is your default dump...
2007-05-01, 5586👍, 0💬

How To View the Dropped Tables in Your Recycle Bin
How To View the Dropped Tables in Your Recycle Bin? - Oracle DBA FAQ - Managing Oracle Database Tables You can look what's in your recycle bin through the predefined view called RECYCLEBIN. You can use the SELECT statement to list the dropped tables as shown in the following script: SQL> connect HR/...
2007-05-04, 5585👍, 0💬

How To Create Your Own Reports in SQL Developer
How To Create Your Own Reports in SQL Developer? - Oracle DBA FAQ - Introduction to Oracle SQL Developer Oracle SQL Developer also lets you create your own reports. See the following steps on how to do this: Click menu View. Selects Reports from the menu. Open Reports. Right-click on User Defined Re...
2007-04-27, 5585👍, 0💬

How To Rebuild an Index
How To Rebuild an Index? - Oracle DBA FAQ - Managing Oracle Table Indexes If you want to rebuild an index, you can use the "ALTER INDEX ... REBUILD statement as shown in the following SQL script: SELECT index_name, table_name, uniqueness FROM USER_INDEXES WHERE table_name = 'EMPLOYEES'; INDEX_NAME T...
2007-04-27, 5583👍, 0💬

How To Bring a Tablespace Online
How To Bring a Tablespace Online? - Oracle DBA FAQ - Managing Oracle Tablespaces and Data Files If you have brought a tablespace offline, now you want to make it available to users again, you can use the ALTER TABLESPACE ... ONLINE statement as shown in the following script: SQL> connect HR/fyicente...
2007-05-03, 5582👍, 0💬

What Is a Dead Lock
What Is a Dead Lock? - Oracle DBA FAQ - Understanding SQL Transaction Management A dead lock is phenomenon happens between two transactions with each of them holding a lock that blocks the other transaction as shown in the following diagram: (transaction 1) (transaction 2) update row X to create loc...
2007-04-17, 5580👍, 0💬

How To Pass Parameters to Procedures
How To Pass Parameters to Procedures? - Oracle DBA FAQ - Introduction to PL/SQL Store procedures or functions can take parameters. You need to define parameters while defining the procedure, and providing values to parameters while calling the procedure. The script below shows you how to do this: SQ...
2007-04-26, 5577👍, 0💬

What Are DDL Statements
What Are DDL Statements? - Oracle DBA FAQ - Understanding SQL DDL Statements 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 ex...
2007-04-22, 5573👍, 0💬

How To Update a Table Row with a Record
How To Update a Table Row with a Record? - Oracle DBA FAQ - Working with Database Objects in PL/SQL If you have a RECORD variable with data fields matching a table structure, you can update a row in this table with this RECORD variable using the UPDATE ... SET ROW statement as shown in the sample sc...
2007-04-26, 5562👍, 0💬

<< < 2 3 4 5 6 7 8 9 10 11 12 > >>   Sort: Date