dara_o_c
asked on
SQL statements - What do they do?
Guys,
I'm trying to understand the following statements do in Oracle.
CREATE ROW TYPE employee_type (
ename VARCHAR(25),
ssn CHAR(9),
salary INT) ;
CREATE ROW TYPE engineer_type (
degree VARCHAR(10),
license VARCHAR(20))
UNDER employee_type ;
CREATE ROW TYPE engr_mgr_type (
manager_start_date DATE
dept_managed VARCHAR(20))
UNDER engineer_type ;
What I'm just trying to understand is what does the CREATE ROW TYPE bit do?
I'm trying to understand the following statements do in Oracle.
CREATE ROW TYPE employee_type (
ename VARCHAR(25),
ssn CHAR(9),
salary INT) ;
CREATE ROW TYPE engineer_type (
degree VARCHAR(10),
license VARCHAR(20))
UNDER employee_type ;
CREATE ROW TYPE engr_mgr_type (
manager_start_date DATE
dept_managed VARCHAR(20))
UNDER engineer_type ;
What I'm just trying to understand is what does the CREATE ROW TYPE bit do?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
In Oracle you can create a TYPE as ROWTYPE in PL/SQL. You can't use create rowtype.
%ROWTYPE is used to declare a record with the same types as found in the specified database table, view or a cursor.
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/rowtype_attribute.htm
%ROWTYPE is used to declare a record with the same types as found in the specified database table, view or a cursor.
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/rowtype_attribute.htm
Right.. I think your question is answered....
Cheers...
Cheers...
An explanation is here:
http://publib.boulder.ibm.com/infocenter/idshelp/v10/index.jsp?topic=/com.ibm.sqls.doc/sqls254.htm
wmp