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
Enrolment was split - SQL Example shows how relvars IS_CALLED and IS_ENROLLED_ON can be derived from the original ENROLMENT relvar, using projection in the initial assignment

FETCH Statement The FETCH statement retrieve rows of data one at a time from the result set of the multi-row query. The data is stored in fields or variables which correspond t

1. Create a procedure called TAX_COST_SP to accomplish the tax calculation task. Keep in mind that the state and subtotal values are inputs into the procedure and the procedure is

Keys in SQL SQL support for keys in the following respects: SQL does not require at least one key for every base table. If no key is explicitly declared, then KEY {ALL B

Declaring Objects: You can use the object types wherever built-in types like CHAR or NUMBER can be used. In the block below, you can declare object r of type Rational. Then, yo

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

I need SQL Data Base Project Description: Network SQL database and SQL Setup two 4 workstation Skills required are Data Entry, MySQL, SQL

Effects of NULL for Table Expression Here's an important distinction between expressions denoting tables and expressions denoting multisets of rows: a table expression cannot

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

Expressions   An expression is a randomly complex combination of the constants, variables, literals, operators, & function calls. The simplest expression is the single variabl