Example of delete - sql, PL-SQL Programming

Example of DELETE - SQL

As with UPDATE, a FOR PORTION OF clause can be specified if the target table has a defined period name, as illustrated in Example.

Example: Deleting a "portion" of the salary history table

DELETE SAL_HISTORY

FOR PORTION OF During

FROM DATE ('2012-01-01') TO DATE ('2012-02-01')

WHERE EmpNo = '123456';

As a result, the row

('123456', 55000, DATE ('2011-09-01'), DATE ('2012-08-01'))

is replaced by the two rows

('123456', 55000, DATE ('2011-09-01'), DATE ('2012-01-01')),

('123456', 55000, DATE ('2012-02-01'), DATE ('2012-08-01'))

and the DELETE statement will have effected an increase in cardinality instead of the usual decrease.

Posted Date: 1/18/2013 11:39:30 PM | Location : United States







Related Discussions:- Example of delete - sql, Assignment Help, Ask Question on Example of delete - sql, Get Answer, Expert's Help, Example of delete - sql Discussions

Write discussion on Example of delete - sql
Your posts are moderated
Related Questions
Relational Operators and Logical Operators It prepares the ground for subsequent sections in which each specific relational operator is paired with its logical counterpart, su

Fetching with a Cursor The FETCH statements retrieve the rows in the result set one at a time. After each and every fetch, the cursor advance to the next row in the result set

"Not Enforced" Table Constraints A constraint that is not enforced is not really a constraint within the meaning of the act, but SQL does have such a concept and it needs to b

V ariables and Constants in PL/SQL The PL/SQL permits you to declare constants and variables, and then use them in SQL and procedural statements anywhere in the expression. Th

Row Counterparts of Table Operators SQL does not have counterparts tuple rename, tuple projection, tuple extension, tuple join and tuple compose. To obtain the same effects as

Bulk Binds advantages In the Embedded Oracle RDBMS, the PL/SQL engines accept any valid PL/SQL subprogram or block. As the figure shows, the PL/SQL engine executes all procedur

Effects of NULL in Table Literal When a VALUES expression appears as the source value for an SQL INSERT statement, the key word NULL can appear as a field value, such that for

%ISOPEN The Oracle closes the SQL cursor automatically after executing its related SQL statement. As a result, the %ISOPEN forever yields FALSE.

Parameter and Keyword Description: SQL: This SQL is the name of the implicit SQL cursor. %FOUND: This attribute results TRUE if an INSERT, DELETE, or UPDATE state

Advantages of Exceptions Using the exceptions for the error handling has many benefits. Without an exception handling, every time you issue a command, you should ensure for th