Link to home
Start Free TrialLog in
Avatar of dara_o_c
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?
Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

Seeems that it' Informix, not Oracle.

An explanation is here:

http://publib.boulder.ibm.com/infocenter/idshelp/v10/index.jsp?topic=/com.ibm.sqls.doc/sqls254.htm

wmp
ASKER CERTIFIED SOLUTION
Avatar of expert_tanmay
expert_tanmay
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of haidsenthil
haidsenthil

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
Right.. I think your question is answered....

Cheers...