Example of delete - sql, PL-SQL Programming

Assignment Help:

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.


Related Discussions:- Example of delete - sql

Data types in sql - decimal, Data Types in SQL - Decimal DECIMAL, NUME...

Data Types in SQL - Decimal DECIMAL, NUMERIC, REAL, FLOAT and various other terms for various sets of rational numbers. When these key words are specified for the declared typ

Name resolution - pl/sql, Name Resolution   During the compilation, th...

Name Resolution   During the compilation, the PL/SQL compiler relates identifiers like the name of a variable with an address or memory location, actual value, or datatype. Th

Heap sort algorithm in pl sql, I want to implement heap sort algorithm in p...

I want to implement heap sort algorithm in pl sql please share the source code for guidance

%rowtype - cursors, %ROWTYPE: This attribute gives a record type which ...

%ROWTYPE: This attribute gives a record type which represents a row in the database table or a row fetched from a formerly declared cursor. The Fields in the record and corresp

For-loop -iterative control, FOR-LOOP While the number of iterations thr...

FOR-LOOP While the number of iterations through a WHILE loop is unknown till the loop completes, then the number of iterations through a FOR loop is known before the loop is ent

Processing transactions, Processing Transactions This part describes ho...

Processing Transactions This part describes how to do the transaction processing. You learn the fundamental techniques that safeguard the consistency of your database, involvin

I need simple hosted sql database, Project Description: I want a small r...

Project Description: I want a small relational database to be built. I want the database to have the subsequent information tables: Employee Information Document storage

Homework, What are the rates for help in writing PL/SQL procedures and func...

What are the rates for help in writing PL/SQL procedures and functions?

Example of check constraints - sql, Example of Check Constraints Examp...

Example of Check Constraints Example: Workaround for when subqueries not permitted in CHECK constraints CREATE FUNCTION NO_MORE_THAN_20000_ENROLMENTS ( ) RETURNS BOOLEAN

Cursors in pl/sql, Cursors The Oracle uses work areas to execute the SQ...

Cursors The Oracle uses work areas to execute the SQL statements and to store process information. A PL/SQL construct known as the cursor. Let's you assume name a work area and

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