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
When Are Constraints Checked Under the model constraints are conceptually checked at all statement boundaries (and only at statement boundaries). By default the same is true

Package Body: The package specification is implemented by the package body. That is, the package body has the definition of every cursor and the subprogram declared in the pac

Example of Null operator - NiNo Rule If we wanted to make HIGHER_OF adhere to "NULL in, NULL out"-let's call it the NiNo rule-we would have to write something like what is sho

Built-In Functions The PL/SQL provides a lot of powerful functions to help you to manipulate the data. These built-in functions fall into the categories as shown below: error r

SQL Functions The PL/SQL uses all the SQL functions involving the following aggregate functions that summarize the whole columns of the Oracle data: GROUPING, AVG, COUNT, STDDE

PPD , CPA, Filesharing Site Project Description: This is very easy I need a PPD , CPA, Filesharing Site. [PPD] stands for (pay per download) example hotsharecash [Files

Question: (a) In the context of database security explain how the following database features help to enforce security in the database system: (i) Authorisation (ii) Access

SELECT INTO Statement   The SELECT INTO statement retrieve data from one or more database tables, and then assigns the selected values to the variables or fields. Syntax:

Using the FORALL Statement The keyword FORALL instruct the PL/SQL engine to bulk-bind input collections before sending them all to the SQL engine. Though the FORALL statement

Keyword &Parameter Description: index_name: This is an undeclared identifier which can be referenced only within the FORALL statement and only as the collection subscript