Keys in sql, PL-SQL Programming

Keys in SQL

SQL support for keys in the following respects:

  1. SQL does not require at least one key for every base table. If no key is explicitly declared, then KEY {ALL BUT} is implicit.
  2. When no key is specified there is no prohibition on multiple appearances of the same row.
  3. SQL does not recognize the empty set as a key.
  4. SQL allows a key to be a proper superset of another key for the same base table. (This "feature" is sometimes used as a workaround for the fact that the columns of the foreign key are required to correspond to those of a declared key of the referenced table.)
Posted Date: 1/18/2013 11:31:39 PM | Location : United States







Related Discussions:- Keys in sql, Assignment Help, Ask Question on Keys in sql, Get Answer, Expert's Help, Keys in sql Discussions

Write discussion on Keys in sql
Your posts are moderated
Related Questions
Cursor Variables:   To execute the multi-row query, the Oracle opens an unnamed work region that stores the processing information. You can use an explicit cursor that names

CURRVAL and NEXTVAL The series is a schema object which generates the sequential numbers. Whenever you form a sequence, you can specify its primary value and an increment. T

Transaction Visibility As the figure shows, the changes made by an autonomous transaction become visible to another transaction whenever the autonomous transaction commits. Th

Functions   The function is a subprogram that calculates a value. The Functions and procedures are structured similar, except that the functions have a RETURN clause. You can

Restriction and AND - SQL Restriction is available via the WHERE operator, and so it is in SQL. However, by Example showing how a certain simple restriction can be expressed u

FETCH Statement The FETCH statement retrieve rows of data one at a time from the result set of the multi-row query. The data is stored in fields or variables which correspond t

What Is a Package? The package is a schema object that group logically related PL/SQL items, types, and subprograms. The Packages usually have 2 parts, a specification & a bo

%FOUND Subsequent to a cursor or cursor variable is opened but before the first fetch, the %FOUND yields NULL. Afterward, it yields TRUE when the last fetch returned a row, or

Write a cursor to open an employee database and fetch the employee record whose age is greater than 45

Dynamic Ranges The PL/SQL lets you determine the loop range dynamically at run time, as the example below shows: SELECT COUNT(empno) INTO emp_count FROM emp; FOR i IN 1..emp_cou