Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Remote Operations:
As the illustration shows below, the PL/SQL subprograms can execute the dynamic SQL statements which refer to the objects on a remote database:
PROCEDURE delete_dept (db_link VARCHAR2, dept_num INTEGER) IS
BEGIN
EXECUTE IMMEDIATE 'DELETE FROM dept@' || db_link ||
' WHERE deptno = :n' USING dept_num;
END;
The targets of remote procedure calls (RPCs) can also contain the dynamic SQL statements. For illustration, assume that the following stand-alone function, that returns the number of rows in the table, reside on the Chicago database:
CREATE FUNCTION row_count (tab_name CHAR) RETURN INT AS
rows INT;
EXECUTE IMMEDIATE 'SELECT COUNT(*) FROM ' || tab_name INTO rows;
RETURN rows;
From an unspecified block, you may call the function remotely, as shown below:
DECLARE
rows INTEGER;
rows := row_count@chicago('emp');
Updating Variables For assignment, SQL uses the key word SET, as in SET X = X + 1 (read as "set X equal to X+1") rather than X: = X + 1 as found in many computer languages.
UNION without CORRESPONDING - SQL The use of UNION without CORRESPONDING. Example is merely by omitting CORRESPONDING, but only because the operands have identical SELECT clau
Package Body: The package specification is implemented by the package body. That is, the package body has the definition of every cursor and the subprogram declared in the pac
ALTER TABLE bb_basketitem ADD CONSTRAINT bitems_qty_ck CHECK (quantity BEGIN INSERT INTO bb_basketitem VALUES (88,8,10.8,21,16,2,3); END; Brewbean’s wants to add a check
Predicate - SQL Consider the declarative sentence-a proposition-that is used to introduce this topic: "Student S1, named Anne, is enrolled on course C1." Recall that th
Inserting Objects: You can use the INSERT statement to add objects to an object table. In the illustration below, you insert a Person object into the object table persons:
#quesWrite a cursor to open an employee database and fetch the employee record whose age is greater than 45.tion..
Cursor Attributes The Cursors and cursor variables have 4 attributes which give you helpful information about the execution of a data manipulation statement. Syntax:
Using DEFAULT You can use the keyword DEFAULT rather than that of the assignment operator to initialize the variables. For e.g. the declaration blood_type CHAR := ’O’; it can b
Aggregate Operators SQL Supports all of the aggregate operators mentioned in the theory book and many more besides. The syntax, however, involves an unusual trick that SQL cal
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd