Selecting objects in pl sql, PL-SQL Programming

Selecting Objects:

Suppose that you have run the SQL*Plus script below that creates object type Person and object table persons, and that you have settled the table:

CREATE TYPE Person AS OBJECT (

first_name VARCHAR2(15),

last_name VARCHAR2(15),

birthday DATE,

home_address Address,

phone_number VARCHAR2(15))

/

CREATE TABLE persons OF Person

/

The sub query below produces a result set of the rows containing only the attributes of the Person objects:

BEGIN

INSERT INTO employees -- another object table of type Person

SELECT * FROM persons p WHERE p.last_name LIKE '%Smith';

Posted Date: 10/6/2012 8:17:38 AM | Location : United States







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

Write discussion on Selecting objects in pl sql
Your posts are moderated
Related Questions
Packages The package is a schema object which groups logically associated to the PL/SQL items, types, and subprograms. The Packages have 2 sections: the specification & the bod

Explicit Cursor Attributes The cursor variable or each cursor has four attributes: %FOUND, %ISOPEN, %ROWCOUNT, and %NOTFOUND. When appended to the cursor or cursor variable, th

THEO R Y OF ETERNITY OF LIFE (PRAYER - 1880) - The theory of eternity of life, also called the steady-state theory , states that life has ever been in existence as at presen

Scope Rules You cannot declare an exception twice in the similar block. Though, you can, declare the similar exception in 2 different blocks. The Exceptions declared in a bloc

The 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 p

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

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

EXIT Statement   You can use the EXIT statement to exit a loop. The EXIT statement has 2 forms: the conditional EXIT WHEN and the unconditional EXIT. With the either form, you

Left and Right Joins LEFT OUTER JOIN can be used when you want to retrieve the data from the main table (table1) even if there is no match in other tables (table_2, table_3...

Passing Cursor Parameters You use the OPEN statement to pass the parameters to a cursor. Unless you want to accept the default values, each proper parameter in the cursor decl