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
If two relations R and S are joined, then the non matching tuples of both R and S are ignored in __________________.

Example of GROUPBY Operator Example: How many students sat each exam, using GROUP BY, NATURAL LEFT JOIN, and COALESCE SELECT CourseId, COALESCE (n, 0) AS n FROM COURS

Explicit Cursors The set of rows returned by the query can include zero, one, or multiple rows, depending on how many rows meet your search criteria. Whenever a query returns

Brewbean's is implementing a new discount for return shoppers - every fifth completed order receives a 10% discount. The count of orders for a shopper is placed in a packaged varia

Usefulness of Data Type In SQL, as in most computer languages, a type can be used for constraining the values that are permitted to be used for some purpose. In particular, i

Operators on Tables and Rows Row Extraction TUPLE FROM r, SQL has row subqueries. These are just like scalar subqueries except that they may specify more than one column.

Case Sensitivity Similar to all the identifiers, the variables, the names of constants, and parameters are not case sensitive. For illustration, PL/SQL considers the following n

set serveroutput on declare a number(5); b number(5); c number(5); begin a:=&a; b:=&b; c:=a/b; dbms_output.put_line(c); exception when zero_divide then d

SQL outer join SELECT * FROM IS_CALLED NATURAL LEFT JOIN IS_ENROLLED_ON Note that adding LEFT to an invocation of CROSS JOIN has no effect unless the right-hand operand

Keyword and Parameter Description: label_name: This is an undeclared identifier which labels an executable statement or the PL/SQL block. You can use a GOTO statement to