Table literals - sql, PL-SQL Programming

Assignment Help:

Table Literals - SQL

One might expect SQL to support table literals in the manner illustrated in Example 2.2, but in fact that is not a legal SQL expression.

Example: Not a Table Literal

TABLE (

ROW (StudentId 'S1', CourseId 'C1', Name 'Anne'),

ROW (StudentId 'S1', CourseId 'C2', Name 'Anne'),

ROW (StudentId 'S2', CourseId 'C1', Name 'Boris'),

ROW (StudentId 'S3', CourseId 'C3', Name 'Cindy'),

ROW (StudentId 'S4', CourseId 'C1', Name 'Devinder') 

);

It is illegal because row literals in SQL do not use column names. Instead, the column values must be written in the appropriate order, reflecting the order of the columns of the table, as in

ROW ('S1', 'C1', 'Anne')

Moreover, the word VALUES is used in place of TABLE, parentheses is not used around the list of row literals, and the key word ROW is in fact optional.


Related Discussions:- Table literals - sql

program for employees -ado.net framework , Challenge 1 You are require...

Challenge 1 You are required to do the project and write a test plan for it. Demo 4 is a check writer program for employees. In it, the user enters all information about the

%notfound - implicit cursor attributes, %NOTFOUND The %NOTFOUND is the...

%NOTFOUND The %NOTFOUND is the logical opposite of the %FOUND. The %NOTFOUND yields TRUE when an INSERT, UPDATE, or DELETE statement affected no rows, or the SELECT INTO state

Need database development with analysis tools, Need Database Development wi...

Need Database Development with Analysis Tools Project Description: I want a database for large governmental and private data sets on one country that can be simply extended t

Table comparison - sql, Table Comparison - SQL The following definitio...

Table Comparison - SQL The following definitions for relation comparisons: Let r1 and r2 be relations having the same heading. Then: r1 ⊆ r2 is true if every tuple of r1

Autonomous versus nested transactions, Autonomous versus Nested Transaction...

Autonomous versus Nested Transactions Though an autonomous transaction is started by the other transaction, it is not a nested transaction for the reasons shown below: (i)

Calculate the number of tuples, Question: (a) The objective of query opti...

Question: (a) The objective of query optimization is to choose the most efficient strategy for implementing a given relational query, thereby improving the system performance. On

Assignment 4, I need a query for PL/SQL, selecting names with cursor, goes ...

I need a query for PL/SQL, selecting names with cursor, goes down the list, assigns usernames (initials001) based on initials in the name. If two names have same initials the user

Write an anonymous block that contains a pl/sql function, a. Write an anon...

a. Write an anonymous block that contains a PL/SQL function. Given an order number orderNo, the function will calculate the total number of the parts in the order. Then the anonym

Theory of catastrophism or catalysm - origin of life, THEO R Y OF CATASTR...

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

Overloading method in pl/sql, Overloading: Similar to packaged subprog...

Overloading: Similar to packaged subprograms, methods of the same type can be overloaded. That is, you can use similar name for various methods if their formal parameters diff

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

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!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd