Use of table comparisons - sql, PL-SQL Programming

Use of Table Comparisons - SQL

Table comparisons where it is noted that although table expressions cannot be compared, we have TABLE (t) to convert a table expression t into a value expression of type ROW ( r ) MULTISET, where r is the row type of t. However, the only operator in SQL for comparing two multisets is "=", so SQL has no direct counterparts of examples, which use "⊆", and nor does this chapter.

Those examples are shown merely to demonstrate that every constraint that can be expressed as an invocation of IS_EMPTY can be formulated alternatively as an invocation of "⊆". If SQL were to have a counterpart of that operator, it would presumably have to be an "is submultiset of " operator, where m1 is a submultiset of m2 if and only if each element of m1 appears at least as many times in m2 as it does in m1. But SQL doesn't have such an operator.

Posted Date: 1/18/2013 7:45:28 AM | Location : United States







Related Discussions:- Use of table comparisons - sql, Assignment Help, Ask Question on Use of table comparisons - sql, Get Answer, Expert's Help, Use of table comparisons - sql Discussions

Write discussion on Use of table comparisons - sql
Your posts are moderated
Related Questions
Data Types in SQL - XML, Array, Row BINARY LARGE OBJECT for arbitrarily large bit strings. XML for XML documents and fragments. ARRAY types for arrays.

Create a Oracle procedure to produce vertical output format when selecting rows from a database table.

Dynamic SQL: The Most PL/SQL programs do a predictable, specific job. For illustration, a stored procedure may accept an employee number and salary increase, and then update t

query to Find the account numbers of all customers whose balance is more than 10,000 $

GOTO Statement The GOTO statement branches to a label unconditionally. The label must be exclusive within its scope and should precede an executable statement or a PL/SQL block.

Relational Algebra - SQL It describes some operators, that together constitute an algebra that is not only relationally complete but also irreducibly so (very nearly- apart f

On occasion, some of Brewbean's customers mistakenly leave an item out of a basket already checked out, so they create a new basket containing the missing items. However, they requ

At times, customers make mistakes in submitting their orders and call to cancel the order. Brewbean’s wants to create a trigger that automatically updates the stock level of all pr

Iteration Schemes The bounds of a loop range can be variables, literals, variables, or expressions but must compute to integers. Below are some of the examples. As you can see t

Query: SELECT * FROM EMPLOYEE1; Select 5 columns and all rows from one table Query: SELECT C_ID, COMPANY, BUILDING, DEPARTMENT, BRANCH FROM CONTRACT;