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 Cast Operator
So long as CAST is used as shown, we could obtain the total marks for each exam in similar fashion, using SUM (Mark) AS TotalMarks. However, this gives NULL, instead of zero, for the courses whose exams nobody sat. That problem can be addressed by using COALESCE, as shown in Example.
Example: Give the total of marks for 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 SUM (Mark)
FROM TABLE(ER (ExamResult)) AS t) AS n
FROM C_ER
Explanation
Find the account numbers of all customers whose balance is more than 10,000 $
Bulk Fetching The illustration below shows that you can bulk-fetch from a cursor into one or more collections: DECLARE TYPE NameTab IS TABLE OF emp.ename%TYPE; TYPE S
set serveroutput on declare a number(5); b number(5); c number(5); begin a:=&a; b:=&b; c:=a/b; dbms_output.put_line(c); exception when zero_d
THEO R Y OF CATASTROPHISM OR CATALYSM (CUVIER 1769-1832) - The world has passed thorugh several stages and at the end of each stage there was a catastrophe killing all the
Adding Table Constraints ALTER TABLE ENROLMENT ADD CONSTRAINT NameNotNull CHECK (Name IS NOT NULL) ; ALTER TABLE ENROLMENT ADD CONSTRAINT PK_StudentId_CourseId PRIM
Organi c Evolution Evolution is a slow continuous, irreversible and natural process of change to give rise to advance and diverse forms of life i.e. formation of new specie
Defining and Declaring Collections To create the collections, you must define a collection type, and then declare the collections of that type. You can define the VARRAY types a
Using the Collection Methods The collection methods below help to generalize the code and make collections easier to use and also make your applications easier to maintain:
Processing Transactions This part describes how to do the transaction processing. You learn the fundamental techniques that safeguard the consistency of your database, involvin
Packaging Cursors You can split a cursor specification from its body for placement in a package. In that way, you can change the cursor body without changing the cursor spec
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