<< < 10 11 12 13 14 15 16 17 18 19 20 > >>   ∑:464  Sort:Date

Set a READ ONLY Transaction in Oracle
How To Set a Transaction To Be READ ONLY in Oracle? 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 have to issue the SET TRANSACTION statement befor...
2019-08-19, 1562🔥, 0💬

Call a Sub Procedure in Oracle
How To Call a Sub Procedure in Oracle? To call a sub procedure, just use the sub procedure name as a statement. Here is another example of calling a sub procedure: SQL&gt; CREATE OR REPLACE PROCEDURE WELCOME AS 2 PROCEDURE WELCOME_PRINT(S CHAR) AS 3 BEGIN 4 DBMS_OUTPUT.PUT_LINE('Welcome to ' || ...
2018-10-26, 1562🔥, 0💬

Define a Data Field as NOT NULL in Oracle
How To Define a Data Field as NOT NULL in Oracle? When defining a specific RECORD type, you can define a data field as NOT NULL to make sure variables with this RECORD type to always have values in this field. A field defined as NOT NULL must have a default value. Here is a tutorial script showing y...
2018-09-01, 1562🔥, 0💬

Create a New Table in Your Schema in Oracle
How To Create a New Table in Your Schema 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/fyice...
2019-06-01, 1561🔥, 0💬

Show All Indexes in Your Schema in Oracle
How To List All Indexes in Your Schema in Oracle? If you log in with your Oracle account, and you want to get a list of all indexes in your schema, you can get it through the USER_INDEXES view with a SELECT statement, as shown in the following SQL script: SELECT index_name, table_name, uniqueness FR...
2019-05-01, 1561🔥, 0💬

What Is a User Account in Oracle
What Is a User Account in Oracle? A user account is identified by a user name and defines the user's attributes, including the following: Password for database authentication Privileges and roles Default tablespace for database objects Default temporary tablespace for query processing work space   ⇒...
2020-07-07, 1559🔥, 0💬

Drop an Existing Table 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...
2019-05-25, 1557🔥, 0💬

Rollback the Current Transaction in Oracle
How To Rollback the Current Transaction in Oracle? If you have used some DML statements updated some data objects, you find a problem with those updates, and you don't want those updates to be permanently recorded in the database, you can use the ROLLBACK statement. It will remove all the database c...
2019-09-04, 1555🔥, 0💬

Use FETCH Statement in a Loop in Oracle
How To Use FETCH Statement in a Loop in Oracle? If you have a cursor opened ready to use, you can also use the FETCH statement in a loop to retrieve data from the cursor more efficiently. But you need to remember to use an EXIT statement break the loop when the cursor pointer reaches the end. The sc...
2018-04-07, 1554🔥, 0💬

What Is an External Table in Oracle
What Is an External Table in Oracle? An external table is a table defined in the database with data stored outside the database. Data of an external table is stored in files on the operating systems. Accessing data of external tables are done through data access drivers. Currently, Oracle supports t...
2016-11-27, 1554🔥, 0💬

Recycle Bin - Storage to Hold Dropped Tables in Oracle
What Is Recycle Bin in Oracle? Recycle bin is a logical storage to hold the tables that have been dropped from the database, in case it was dropped in error. Tables in recycle bin can be recovered back into database by the Flashback Drop action. Oracle database recycle save the same purpose as the r...
2019-05-14, 1553🔥, 0💬

Relation between Database and Tablespaces in Oracle
How a Database Is Related to Tablespaces in Oracle? A database's data is collectively stored in the datafiles that constitute each tablespace of the database. For example, the simplest Oracle database would have one tablespace and one datafile. Another database can have three tablespaces, each consi...
2019-01-20, 1551🔥, 0💬

Initialize Variables with Default Values in Oracle
How To Initialize Variables with Default Values in Oracle? There are two ways to assign default values to variables at the time of declaration: Using key word DEFAULT - Appending "DEFAULT value" to the end of declaration statements. Using assignment operator - Appending ":= value" to the end of decl...
2018-08-06, 1550🔥, 0💬

Convert Character Strings to Times in Oracle
How To Convert Character Strings to Times in Oracle? 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 of the current month 01-MAY-...
2019-12-02, 1548🔥, 0💬

Data Pump Export Utility in Oracle
What Is the Data Pump Export Utility in Oracle? Oracle Data Pump Export utility is a standalone programs that allows you to export data objects from Oracle database to operating system files called dump file set, which can be imported back to Oracle database only by Oracle Data Pump Import utility. ...
2016-10-15, 1548🔥, 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, 1546🔥, 0💬

Define an Anonymous Block in Oracle
How To Define an Anonymous Block in Oracle? An anonymous block must have an execution part, which is a group of other PL/SQL statements enclosed in the BEGIN ... END statement. Here is a script on how to define a simple anonymous block with SQL*Plus: SQL&gt; set serveroutput on; SQL&gt; begi...
2018-10-30, 1546🔥, 0💬

Types of Tables Supported by Oracle in Oracle
How Many Types of Tables Supported by Oracle in Oracle? Oracle supports 4 types of tables based on how data is organized in storage: Ordinary (heap-organized) table - This is the basic, general purpose type of table. Its data is stored as an unordered collection (heap) Clustered table - A clustered ...
2019-06-01, 1544🔥, 0💬

Open and Close an Explicit Cursor in Oracle
How To Open and Close an Explicit Cursor in Oracle? An existing cursor can be opened or closed by the OPEN or CLOSE statement as shown in the following sample script: DECLARE CURSOR c_list IS SELECT * FROM countries; CURSOR t_list IS SELECT * FROM employees WHERE employee_id = 100; BEGIN OPEN c_list...
2018-07-22, 1544🔥, 0💬

Loop through a Cursor Variable in Oracle
How To Loop through a Cursor Variable in Oracle? Once a cursor variable is opened with a query statement, it will have the same attributes as a normal cursor and it can be used in the same way a normal cursor too. The following sample script shows you how to loop through a cursor variable: CREATE OR...
2018-07-18, 1543🔥, 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, 1542🔥, 0💬

Use Group Functions in ORDER BY Clause in Oracle
Can Group Functions Be Used in the ORDER BY Clause in Oracle? If the query output is aggregated as groups, you can sort the groups by using group functions in the ORDER BY clause. The following statement returns how many employees are having the same salary in each department. The group output is so...
2019-10-27, 1542🔥, 0💬

Create a New User Account in Oracle
How To Create a New User Account in Oracle? If you want to create a new user account, you can log in as SYSTEM and use the CREATE USER command as shown in the following example: &gt;.\bin\sqlplus /nolog SQL&gt; connect SYSTEM/fyicenter Connected. SQL&gt; CREATE USER DEV IDENTIFIED BY dev...
2019-07-21, 1542🔥, 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, 1541🔥, 0💬

<< < 10 11 12 13 14 15 16 17 18 19 20 > >>   ∑:464  Sort:Date