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

in Oracle
How To Delete All Rows from a Table in Oracle? 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 tutorial exercise shows you a good exa...
2020-01-04, 1470🔥, 0💬

System Defined User Roles in Oracle
What Are the System Predefined User Roles in Oracle? Oracle 10g XE comes with 3 predefined roles: CONNECT - Enables a user to connect to the database. Grant this role to any user or application that needs database access. RESOURCE - Enables a user to create certain types of schema objects in his own...
2019-07-30, 1470🔥, 0💬

Update a Table Row with a RECORD in Oracle
How To Update a Table Row with a RECORD in Oracle? 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 script below: CREATE TABLE emp_temp AS SELECT * FRO...
2018-08-14, 1469🔥, 0💬

Call a Stored Functoin with Parameters in Oracle
How To Call a Stored Function with Parameters in Oracle? You can define a function that takes parameters, provide values to those parameters when calling the function. Here is a good example of a function with a parameter: SQL&gt; CREATE OR REPLACE FUNCTION GET_DOUBLE(X NUMBER) 2 RETURN NUMBER A...
2018-10-26, 1468🔥, 0💬

Experiments of Data Locks in Oracle
How To Experiment a Data Lock in Oracle? If you want to have some experience with data locks, you can create two windows running two SQL*Plus sessions. In session 1, you can run a UPDATE statements to create a data lock. Before committing session 2, switch to session 2, and run a UPDATE statements o...
2019-08-08, 1466🔥, 0💬

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...
2019-05-01, 1466🔥, 0💬

Define a Procedure inside another Procedure in Oracle
How To Define a Procedure inside Another Procedure in Oracle? Define a procedure inside another procedure is supported by PL/SQL. The following tutorial script shows you an example: SQL&gt; CREATE OR REPLACE PROCEDURE HR.DBA_WEEK AS 2 PROCEDURE DBA_TASK (day VARCHAR2) AS 3 BEGIN 4 IF day = 'MOND...
2019-02-18, 1465🔥, 0💬

Use of SELECT Statements in Views in Oracle
Can SELECT Statements Be Used on Views in Oracle? 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&gt; CREATE VIEW managed_dept AS SELECT * FROM departments WHERE manage...
2019-12-19, 1464🔥, 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, 1463🔥, 0💬

Run Stored Procedures Interactively in Oracle
How To Run a Stored Procedure Interactively in Oracle? If have an existing stored procedure and you want to run it interactively, the tutorial steps listed below will help you out: Open you connection name, like Local_XE. Open Procedures. Right-click the procedure name: HELLO. Select Run. The Run PL...
2019-01-12, 1462🔥, 0💬

Create a Table Interactively in Oracle
How To Create a Table Interactively in Oracle? If you don't want to use SQL statements to create a new table, you use SQL Developer to create one interactively. Follow the steps below to create a new table called: TIP Right-click on the Tables in the object tree area. Select Create TABLE. Create Tab...
2018-10-08, 1462🔥, 0💬

What Is Oracle SQL Developer in Oracle
What Is Oracle SQL Developer in Oracle? Oracle SQL Developer is a new, free graphical tool that enhances productivity and simplifies database development tasks. With SQL Developer, you can browse database objects, run SQL statements and SQL scripts, and edit and debug PL/SQL statements. You can also...
2019-02-18, 1460🔥, 0💬

What Is Oracle Server Autotrace in Oracle
What Is Oracle Server Autotrace in Oracle? Autotrace is Oracle server feature that generates two statement execution reports very useful for performance tuning: Statement execution path - Shows you the execution loop logic of a DML statement. Statement execution statistics - Shows you various execut...
2020-06-08, 1459🔥, 0💬

Select All Columns of All Rows in Oracle
How To Select All Columns of All Rows from a Table in Oracle? The simplest query statement is the one that selects all columns of all rows from a table: "SELECT * FROM table_name;". The (*) in the SELECT clause tells the query to return all columns. The tutorial exercise below gives you a good examp...
2019-12-19, 1459🔥, 0💬

Assign Values to Variables in Oracle
How To Assign Values to Variables in Oracle? You can use assignment statements to assign values to variables. An assignment statement contains an assignment operator ":=", which takes the value specified on the right to the variable on left. The script below show you some examples of assignment stat...
2018-08-06, 1456🔥, 0💬

Privilege to Delete Rows in Another Schema in Oracle
What Privilege Is Needed for a User to Delete Rows from Tables in Another Schema in Oracle? For a user to delete rows from tables of someone else's schema, he/she needs the DELETE ANY TABLE privilege. The following tutorial exercise gives you a good example of granting "dev" to delete rows in "hr" s...
2019-06-11, 1452🔥, 0💬

Assign a Table Row to RECORD Variable in Oracle
How To Assign a Table Row to a RECORD Variable in Oracle? If you have a table, and want to assign a data row of that table to a RECORD variable, you need to define this RECORD variable to match the table column structure, then use the SELECT ... INTO statement to assign a data row that RECORD variab...
2018-08-14, 1451🔥, 0💬

User Account and Attributes in Oracle
What Is a User Account in Oracle? A user account is identified by a user name and defines 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   ⇒ Use...
2019-07-30, 1448🔥, 0💬

Scope of Local Variables in Oracle
What Is the Scope of a Local Variable in Oracle? The scope of a variable can be described with these rules: A variable is valid within the procedure or function where it is defined. A variable is also valid inside a sub procedure or function defined. If a variable name is collided with another varia...
2018-10-13, 1445🔥, 0💬

Define a Specific RECORD Type in Oracle
How To Define a Specific RECORD Type in Oracle? If you want to define a specific RECORD type, you need to use the TYPE ... IS RECORD statement in the declaration part of any procedure or function. The following example script defines a RECORD type called STUDENT: CREATE OR REPLACE PROCEDURE HELLO AS...
2018-09-01, 1444🔥, 0💬

Define an Explicit Cursor in Oracle
How To Define an Explicit Cursor in Oracle? An explicit cursor must be defined in the declaration part of a procedure or function with the CURSOR ... IS statement as shown in the following sample script: DECLARE CURSOR c_list IS SELECT * FROM countries; CURSOR t_list IS SELECT * FROM employees WHERE...
2018-07-22, 1443🔥, 0💬

Read Consistency in Oracle in Oracle
How Does Oracle Handle Read Consistency in Oracle? Oracle supports two options for you on how to maintain read consistency: READ WRITE (the default option), also called statement-level read consistency. READ ONLY, also called transaction-level read consistency.   ⇒ What Is a READ WRITE Transaction i...
2019-08-23, 1440🔥, 0💬

Define a Variable for a Specific RECORD Type in Oracle
How To Define a Variable of a Specific RECORD Type in Oracle? Once you have your specific RECORD type defined, you can define new variables with this specific RECORD type like any other data type. In the sample script below, several variables are defined with a regular data type and a specific RECOR...
2018-09-01, 1440🔥, 0💬

Count Duplicated Values in a Column in Oracle
How To Count Duplicated Values in a Column in Oracle? If you have a column with duplicated values, and you want to know what are those duplicated values are and how many duplicates are there for each of those values, you can use the GROUP BY ... HAVING clause as shown in the following example. It re...
2019-11-21, 1438🔥, 0💬

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