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!
Example of Using Aggregation on Nested Tables
Example: How many students sat each exam
WITH C_ER AS (SELECT CourseId, CAST (TABLE (SELECT DISTINCT StudentId, Mark FROM EXAM_MARK AS EM WHERE EM.CourseId = C.CourseId) AS ROW ( StudentId SID, Mark INTEGER ) MULTISET) AS ExamResult FROM COURSE AS C) SELECT CourseId, (SELECT COUNT (*) FROM TABLE (ER (ExamResult)) AS t) AS n FROM C_ER
Explanation
CREATE FUNCTION ER
(SM ROW ( StudentId SID, Mark INTEGER ) MULTISET )
RETURNS TABLE (StudentId SID, Mark INTEGER)
RETURN SM;
The type name TABLE ( StudentId SID, Mark INTEGER ) is actually just a synonym for ROW (StudentId SID, Mark INTEGER ) MULTISET). The misleading synonym is available only in a RETURNS clause and not as a parameter type, for example. So ER is actually a no-op, returning its input.
Advantages of Wrapping The PL/SQL Wrapper convert the PL/SQL source code into a transitional form of the object code. By hiding the application internals, the Wrapper secure
%ISOPEN The %ISOPEN yields TRUE if its cursor or cursor variable is open; or else, the %ISOPEN yields FALSE. In the illustration, you use the %ISOPEN to select an action:
Extension and AND in SQL The theory book gives the following simple example of relational extension in Tutorial D: EXTEND IS_CALLED ADD ( FirstLetter ( Name ) AS Initial )
Main features of PL/SQL A good way to get familiar with PL/SQL is to look at a sample program. The below program processes an order for tennis rackets. At first, it declares a
Keyword and Parameter Description: boolean_expression: This is an expression which results the Boolean value TRUE, FALSE, & NULL. It is related with a series of statement
Using LOCK TABLE You use the LOCK TABLE statement to lock the whole database tables in the specified lock mode so that you can share or deny the access to them. For illustrati
The 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 p
Declarations in SQL Your program stores values in the variables and constants. As the program executes, the value of the variables can change, but the values constants cannot.
Interesting properties of CROSS JOIN - SQL Compare these with the "interesting properties of JOIN", CROSS JOIN is associative but not commutative. Unlike JOIN and NATURAL JOI
UPDATE Command- SQL Loosely speaking, UPDATE changes some of the column values of some existing rows of its target table. Thus, although some rows disappear from the target an
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