SlideShare a Scribd company logo
1 of 4
Download to read offline
Renaming a Column in 9i                                                        Administration Tips




How do I rename a column in Oracle 9i?

In Oracle 9i, you can now perform an in-place rename for any or all columns, and the
entire process uses a new package called dbms_redefinition.

Step 1: Find out whether the table you want to alter is capable of being altered. To do
that, you issue the following command:

EXECUTE DBMS_REDEFINITION.CAN_REDEF_TABLE(‘SCHEMA’,’TABLE NAME’)


...though you obviously enter appropriate values for the schema and table names there. If
that procedure doesn’t report any errors, then you can proceed with the next steps.

Step 2: create a new table that looks like what you want the original table to be when the
redefinition process is over (i.e., create it with columns using the new names, or take the
opportunity to specify new storage parameters and so on). This is a ‘holding table’ which
will eventually be swapped with the original. It must not contain any data -we are
interested merely in its definition. The holding table must exist within the same
schema as the original one being modified.

Step 3: run the dbms_redefinition.start_redef_table package/procedure to describe the
real table, its holding table counterpart, and any column mapping information needed.
For example:

EXECUTE DBMS_REDEFINITION.START_REDEF_TABLE      (‘SCOTT’,’EMP’,’HOLDING_EMP’, -
‘EMPNO EMPLOYEE_NO’, -
‘ENAME ENAME’, -
‘MGR MANAGER_NO’
…AND SO ON…)

Note here how two columns are being re-named, but one of them isn’t. Also note the use
of the minus sign at the end of each line -that's just a continuation character. Without it,
the package/procedure will attempt to run before you've typed in the entire remapping
data.

Step 4: run the dbms_redefinition.finish_redef_table procedure, supplying the schema, the
original table name and the holding table name as the parameters:

EXECUTE DBMS_REDEFINITION.FINISH_REDEF_TABLE       (‘SCOTT’,’EMP’,’HOLDING_EMP’)

And at the end of that procedure, you'll be able to select from the original table, and see
that the columns really have been changed.

There are some nasties to watch out for when doing this, however.

Copyright © Howard Rogers 2001            10/17/2001                                    Page 1 of 4
Renaming a Column in 9i                                                          Administration Tips




Firstly, any constraints that exist on the original table must be defined on the holding
table, too, if you want them to be there at the end of the exercise. But, since this is all
taking place in the one schema, if you were to name your primary or key constraints for
the holding table the same as on the real table, the indexes that get created when such
constraints are created would end up with the same name… so the constraint names must
be different. (Incidentally, if you’ve any triggers or secondary indexes on the original
table, they must be created on the holding table, too. Again, this means index names
change).

Second, any foreign key constraints you want preserved also have to be created on the
holding table -but they must be set to be DISABLED (they get automatically enabled at the
end of the process).

Third, the mechanism Oracle uses to make this all happens is a materialized view. The
trouble is, you can’t (as of 9.0.1) redefine a table on which a legitimate materialized view
has been created (it produces an ORA-12091 error if you try it). That might not be a
problem, except that the entire redefinition process starts by taking a snapshot (i.e., a
materialized view) of the original table. What that means is that if anything goes wrong
with the redefinition (perhaps a syntax error in line 128 of the start_redef procedure
script), a materialized view has already been created on the source table. And what that
means is that a second attempt at redefinition, with the syntax fixed up, fails for the
12091 reason. That is fairly easily fixed, though, by aborting the entire procedure. To do
that, you run the following command:

EXECUTE DBMS_REDEFINITION.ABORT_REDEF_TABLE       (‘SCOTT’,’EMP’,’HOLDING_EMP’)

Fourth -at the end of the process, you'll be left with the holding table stuffed full of data,
looking exactly as the original table did (i.e., with all the old columns names and so on).
That table is just wasting space, so you need to drop it -but that's not done automatically
for you, so you'll have to remember to issue your own 'drop table holding_emp', for
example.

Fifth, any DML being applied to the original table during this entire process is being
recorded in a journaling table, and will be applied to the resulting table -but if there’s
vast amounts of DML involved, then you ought to use the sync_interim_table procedure to
periodically keep the interim table up-to-date with the changes being made.


Online Table Redefinition Restrictions

Tables that do not have a primary key are not supported (I imagine that this is because any
on-going DML is logged in an Index Organised Table, which can only be created with a
primary key).


Copyright © Howard Rogers 2001             10/17/2001                                     Page 2 of 4
Renaming a Column in 9i                                                          Administration Tips


Any faintly exotic data types are suspect -for example, data types you’ve defined yourself,
bfiles and longs (LOBS are OK) can’t be re-defined online.

Your new table gets all of the rows in the original table -there’s no facility to stick a where
clause in, and only get a subset of them.

And, finally, any new columns added to the table are obviously not going to have any
source data in the original table -so, were you to try and define such columns (on the
holding table) as NOT NULL, you can expect the thing to fail.


Simple Demo

SQL> CONNECT        SCOTT/TIGER@HJR
CONNECTED.

SQL> CREATE TABLE R_TEST(
  2 COL1 CHAR(5) CONSTRAINT R_TEST_PK        PRIMARY KEY,
  3 COL2 NUMBER(7,2));
TABLE CREATED.

SQL>    INSERT INTO R_TEST VALUES     ('AAAA',1238.90);
SQL>    INSERT INTO R_TEST VALUES     ('BBBB',4329.30);
SQL>    COMMIT;


SQL>    SELECT     *   FROM R_TEST;


COL1       COL2
----- ----------
AAAA    1238.9
BBBB    4329.3

SQL> CREATE TABLE RTEST_HOLD(
  2 DEPT_CODE CHAR(5),
  3 SALARY NUMBER(7,2));
TABLE CREATED.

SQL> EXECUTE DBMS_REDEFINITION.CAN_REDEF_TABLE('SCOTT','R_TEST')
PL/SQL PROCEDURE SUCCESSFULLY COMPLETED.

SQL> EXECUTE DBMS_REDEFINITION.START_REDEF_TABLE( -
> 'SCOTT','R_TEST','RTEST_HOLD', -
> 'UPPER(COL1) DEPT_CODE,-
> COL2 SALARY')
PL/SQL PROCEDURE SUCCESSFULLY COMPLETED.


Copyright © Howard Rogers 2001             10/17/2001                                     Page 3 of 4
Renaming a Column in 9i                                          Administration Tips


SQL> EXECUTE
DBMS_REDEFINITION.FINISH_REDEF_TABLE('SCOTT','R_TEST','RTEST_HOLD')
PL/SQL PROCEDURE SUCCESSFULLY COMPLETED.

SQL> SELECT * FROM R_TEST;
DEPT_     SALARY
----- ----------
AAAA      1238.9
BBBB      4329.3

SQL>    DROP TABLE RTEST_HOLD;
TABLE    DROPPED.


SQL> DESC R_TEST;
 NAME                                    TYPE
 --------------------------------        ----------------------------
 DEPT_CODE                               CHAR(5)
 SALARY                                  NUMBER(7,2)




Copyright © Howard Rogers 2001    10/17/2001                              Page 4 of 4

More Related Content

What's hot (18)

Les11
Les11Les11
Les11
 
DDL,DML,SQL Functions and Joins
DDL,DML,SQL Functions and JoinsDDL,DML,SQL Functions and Joins
DDL,DML,SQL Functions and Joins
 
Sql delete, truncate, drop statements
Sql delete, truncate, drop statementsSql delete, truncate, drop statements
Sql delete, truncate, drop statements
 
Oracle Database DML DDL and TCL
Oracle Database DML DDL and TCL Oracle Database DML DDL and TCL
Oracle Database DML DDL and TCL
 
Oracle SQL AND PL/SQL
Oracle SQL AND PL/SQLOracle SQL AND PL/SQL
Oracle SQL AND PL/SQL
 
Les13
Les13Les13
Les13
 
Les10
Les10Les10
Les10
 
Sql DML
Sql DMLSql DML
Sql DML
 
Tony jambu (obscure) tools of the trade for tuning oracle sq ls
Tony jambu   (obscure) tools of the trade for tuning oracle sq lsTony jambu   (obscure) tools of the trade for tuning oracle sq ls
Tony jambu (obscure) tools of the trade for tuning oracle sq ls
 
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with ExamplesDML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
DML, DDL, DCL ,DRL/DQL and TCL Statements in SQL with Examples
 
GFGC CHIKKABASUR ( DDL COMMANDS )
GFGC CHIKKABASUR ( DDL COMMANDS )GFGC CHIKKABASUR ( DDL COMMANDS )
GFGC CHIKKABASUR ( DDL COMMANDS )
 
2
22
2
 
Dml and ddl
Dml and ddlDml and ddl
Dml and ddl
 
Sql basics and DDL statements
Sql basics and DDL statementsSql basics and DDL statements
Sql basics and DDL statements
 
Ddl commands
Ddl commandsDdl commands
Ddl commands
 
MYSQL
MYSQLMYSQL
MYSQL
 
DML Commands
DML CommandsDML Commands
DML Commands
 
Oracle naveen Sql
Oracle naveen   SqlOracle naveen   Sql
Oracle naveen Sql
 

Viewers also liked (10)

Contiguous
ContiguousContiguous
Contiguous
 
Autoextend
AutoextendAutoextend
Autoextend
 
Iot
IotIot
Iot
 
Exportrows
ExportrowsExportrows
Exportrows
 
Ora12154
Ora12154Ora12154
Ora12154
 
Exportinc
ExportincExportinc
Exportinc
 
Completerecovery
CompleterecoveryCompleterecovery
Completerecovery
 
Applyinga blockcentricapproachtotuning
Applyinga blockcentricapproachtotuningApplyinga blockcentricapproachtotuning
Applyinga blockcentricapproachtotuning
 
Real liferecoverypresentation
Real liferecoverypresentationReal liferecoverypresentation
Real liferecoverypresentation
 
Migration
MigrationMigration
Migration
 

Similar to Columnrename9i

PostgreSQL Database Slides
PostgreSQL Database SlidesPostgreSQL Database Slides
PostgreSQL Database Slidesmetsarin
 
SQL Database Performance Tuning for Developers
SQL Database Performance Tuning for DevelopersSQL Database Performance Tuning for Developers
SQL Database Performance Tuning for DevelopersBRIJESH KUMAR
 
Database development coding standards
Database development coding standardsDatabase development coding standards
Database development coding standardsAlessandro Baratella
 
PostgreSQL Performance Tables Partitioning vs. Aggregated Data Tables
PostgreSQL Performance Tables Partitioning vs. Aggregated Data TablesPostgreSQL Performance Tables Partitioning vs. Aggregated Data Tables
PostgreSQL Performance Tables Partitioning vs. Aggregated Data TablesSperasoft
 
Creating a database
Creating a databaseCreating a database
Creating a databaseRahul Gupta
 
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should KnowOTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should KnowAlex Zaballa
 
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should KnowOTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should KnowAlex Zaballa
 
Sql Queries
Sql QueriesSql Queries
Sql Querieswebicon
 
Unit 2 Chap 4 SQL DDL.pptx
Unit 2 Chap 4 SQL DDL.pptxUnit 2 Chap 4 SQL DDL.pptx
Unit 2 Chap 4 SQL DDL.pptxPetroJoe
 
My sql with querys
My sql with querysMy sql with querys
My sql with querysNIRMAL FELIX
 
Data Definition Language (DDL)
Data Definition Language (DDL) Data Definition Language (DDL)
Data Definition Language (DDL) Mohd Tousif
 
Dms 22319 micro project
Dms 22319 micro projectDms 22319 micro project
Dms 22319 micro projectARVIND SARDAR
 
Mysqlppt
MysqlpptMysqlppt
MysqlpptReka
 
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...Alex Zaballa
 
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...Alex Zaballa
 
ii bcom dbms SQL Commands.docx
ii bcom dbms SQL Commands.docxii bcom dbms SQL Commands.docx
ii bcom dbms SQL Commands.docxlakshmi77
 

Similar to Columnrename9i (20)

PostgreSQL Database Slides
PostgreSQL Database SlidesPostgreSQL Database Slides
PostgreSQL Database Slides
 
SQL Database Performance Tuning for Developers
SQL Database Performance Tuning for DevelopersSQL Database Performance Tuning for Developers
SQL Database Performance Tuning for Developers
 
Database development coding standards
Database development coding standardsDatabase development coding standards
Database development coding standards
 
Columndrop
ColumndropColumndrop
Columndrop
 
PostgreSQL Performance Tables Partitioning vs. Aggregated Data Tables
PostgreSQL Performance Tables Partitioning vs. Aggregated Data TablesPostgreSQL Performance Tables Partitioning vs. Aggregated Data Tables
PostgreSQL Performance Tables Partitioning vs. Aggregated Data Tables
 
My sql.ppt
My sql.pptMy sql.ppt
My sql.ppt
 
Creating a database
Creating a databaseCreating a database
Creating a database
 
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should KnowOTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
 
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should KnowOTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
 
Sql Queries
Sql QueriesSql Queries
Sql Queries
 
Unit 2 Chap 4 SQL DDL.pptx
Unit 2 Chap 4 SQL DDL.pptxUnit 2 Chap 4 SQL DDL.pptx
Unit 2 Chap 4 SQL DDL.pptx
 
My sql with querys
My sql with querysMy sql with querys
My sql with querys
 
Data Definition Language (DDL)
Data Definition Language (DDL) Data Definition Language (DDL)
Data Definition Language (DDL)
 
MySQL Essential Training
MySQL Essential TrainingMySQL Essential Training
MySQL Essential Training
 
Dms 22319 micro project
Dms 22319 micro projectDms 22319 micro project
Dms 22319 micro project
 
Mysqlppt
MysqlpptMysqlppt
Mysqlppt
 
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
 
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
 
Sql
SqlSql
Sql
 
ii bcom dbms SQL Commands.docx
ii bcom dbms SQL Commands.docxii bcom dbms SQL Commands.docx
ii bcom dbms SQL Commands.docx
 

More from oracle documents (20)

Windowsosauthent
WindowsosauthentWindowsosauthent
Windowsosauthent
 
Whatistnsnames
WhatistnsnamesWhatistnsnames
Whatistnsnames
 
Whatisadatabaselink
WhatisadatabaselinkWhatisadatabaselink
Whatisadatabaselink
 
Varraysandnestedtables
VarraysandnestedtablesVarraysandnestedtables
Varraysandnestedtables
 
Usertracing
UsertracingUsertracing
Usertracing
 
Userpasswrd
UserpasswrdUserpasswrd
Userpasswrd
 
Userlimit
UserlimitUserlimit
Userlimit
 
Undo internalspresentation
Undo internalspresentationUndo internalspresentation
Undo internalspresentation
 
Undo internals paper
Undo internals paperUndo internals paper
Undo internals paper
 
Tablespacelmt
TablespacelmtTablespacelmt
Tablespacelmt
 
Tablerename
TablerenameTablerename
Tablerename
 
Sql scripting sorcerypresentation
Sql scripting sorcerypresentationSql scripting sorcerypresentation
Sql scripting sorcerypresentation
 
Sql scripting sorcerypaper
Sql scripting sorcerypaperSql scripting sorcerypaper
Sql scripting sorcerypaper
 
Sql for dbaspresentation
Sql for dbaspresentationSql for dbaspresentation
Sql for dbaspresentation
 
Sequencereset
SequenceresetSequencereset
Sequencereset
 
Rollbacksizes
RollbacksizesRollbacksizes
Rollbacksizes
 
Rollbackshrinks
RollbackshrinksRollbackshrinks
Rollbackshrinks
 
Rollbacklmt
RollbacklmtRollbacklmt
Rollbacklmt
 
Rollbackblocking
RollbackblockingRollbackblocking
Rollbackblocking
 
Rollback1555s
Rollback1555sRollback1555s
Rollback1555s
 

Columnrename9i

  • 1. Renaming a Column in 9i Administration Tips How do I rename a column in Oracle 9i? In Oracle 9i, you can now perform an in-place rename for any or all columns, and the entire process uses a new package called dbms_redefinition. Step 1: Find out whether the table you want to alter is capable of being altered. To do that, you issue the following command: EXECUTE DBMS_REDEFINITION.CAN_REDEF_TABLE(‘SCHEMA’,’TABLE NAME’) ...though you obviously enter appropriate values for the schema and table names there. If that procedure doesn’t report any errors, then you can proceed with the next steps. Step 2: create a new table that looks like what you want the original table to be when the redefinition process is over (i.e., create it with columns using the new names, or take the opportunity to specify new storage parameters and so on). This is a ‘holding table’ which will eventually be swapped with the original. It must not contain any data -we are interested merely in its definition. The holding table must exist within the same schema as the original one being modified. Step 3: run the dbms_redefinition.start_redef_table package/procedure to describe the real table, its holding table counterpart, and any column mapping information needed. For example: EXECUTE DBMS_REDEFINITION.START_REDEF_TABLE (‘SCOTT’,’EMP’,’HOLDING_EMP’, - ‘EMPNO EMPLOYEE_NO’, - ‘ENAME ENAME’, - ‘MGR MANAGER_NO’ …AND SO ON…) Note here how two columns are being re-named, but one of them isn’t. Also note the use of the minus sign at the end of each line -that's just a continuation character. Without it, the package/procedure will attempt to run before you've typed in the entire remapping data. Step 4: run the dbms_redefinition.finish_redef_table procedure, supplying the schema, the original table name and the holding table name as the parameters: EXECUTE DBMS_REDEFINITION.FINISH_REDEF_TABLE (‘SCOTT’,’EMP’,’HOLDING_EMP’) And at the end of that procedure, you'll be able to select from the original table, and see that the columns really have been changed. There are some nasties to watch out for when doing this, however. Copyright © Howard Rogers 2001 10/17/2001 Page 1 of 4
  • 2. Renaming a Column in 9i Administration Tips Firstly, any constraints that exist on the original table must be defined on the holding table, too, if you want them to be there at the end of the exercise. But, since this is all taking place in the one schema, if you were to name your primary or key constraints for the holding table the same as on the real table, the indexes that get created when such constraints are created would end up with the same name… so the constraint names must be different. (Incidentally, if you’ve any triggers or secondary indexes on the original table, they must be created on the holding table, too. Again, this means index names change). Second, any foreign key constraints you want preserved also have to be created on the holding table -but they must be set to be DISABLED (they get automatically enabled at the end of the process). Third, the mechanism Oracle uses to make this all happens is a materialized view. The trouble is, you can’t (as of 9.0.1) redefine a table on which a legitimate materialized view has been created (it produces an ORA-12091 error if you try it). That might not be a problem, except that the entire redefinition process starts by taking a snapshot (i.e., a materialized view) of the original table. What that means is that if anything goes wrong with the redefinition (perhaps a syntax error in line 128 of the start_redef procedure script), a materialized view has already been created on the source table. And what that means is that a second attempt at redefinition, with the syntax fixed up, fails for the 12091 reason. That is fairly easily fixed, though, by aborting the entire procedure. To do that, you run the following command: EXECUTE DBMS_REDEFINITION.ABORT_REDEF_TABLE (‘SCOTT’,’EMP’,’HOLDING_EMP’) Fourth -at the end of the process, you'll be left with the holding table stuffed full of data, looking exactly as the original table did (i.e., with all the old columns names and so on). That table is just wasting space, so you need to drop it -but that's not done automatically for you, so you'll have to remember to issue your own 'drop table holding_emp', for example. Fifth, any DML being applied to the original table during this entire process is being recorded in a journaling table, and will be applied to the resulting table -but if there’s vast amounts of DML involved, then you ought to use the sync_interim_table procedure to periodically keep the interim table up-to-date with the changes being made. Online Table Redefinition Restrictions Tables that do not have a primary key are not supported (I imagine that this is because any on-going DML is logged in an Index Organised Table, which can only be created with a primary key). Copyright © Howard Rogers 2001 10/17/2001 Page 2 of 4
  • 3. Renaming a Column in 9i Administration Tips Any faintly exotic data types are suspect -for example, data types you’ve defined yourself, bfiles and longs (LOBS are OK) can’t be re-defined online. Your new table gets all of the rows in the original table -there’s no facility to stick a where clause in, and only get a subset of them. And, finally, any new columns added to the table are obviously not going to have any source data in the original table -so, were you to try and define such columns (on the holding table) as NOT NULL, you can expect the thing to fail. Simple Demo SQL> CONNECT SCOTT/TIGER@HJR CONNECTED. SQL> CREATE TABLE R_TEST( 2 COL1 CHAR(5) CONSTRAINT R_TEST_PK PRIMARY KEY, 3 COL2 NUMBER(7,2)); TABLE CREATED. SQL> INSERT INTO R_TEST VALUES ('AAAA',1238.90); SQL> INSERT INTO R_TEST VALUES ('BBBB',4329.30); SQL> COMMIT; SQL> SELECT * FROM R_TEST; COL1 COL2 ----- ---------- AAAA 1238.9 BBBB 4329.3 SQL> CREATE TABLE RTEST_HOLD( 2 DEPT_CODE CHAR(5), 3 SALARY NUMBER(7,2)); TABLE CREATED. SQL> EXECUTE DBMS_REDEFINITION.CAN_REDEF_TABLE('SCOTT','R_TEST') PL/SQL PROCEDURE SUCCESSFULLY COMPLETED. SQL> EXECUTE DBMS_REDEFINITION.START_REDEF_TABLE( - > 'SCOTT','R_TEST','RTEST_HOLD', - > 'UPPER(COL1) DEPT_CODE,- > COL2 SALARY') PL/SQL PROCEDURE SUCCESSFULLY COMPLETED. Copyright © Howard Rogers 2001 10/17/2001 Page 3 of 4
  • 4. Renaming a Column in 9i Administration Tips SQL> EXECUTE DBMS_REDEFINITION.FINISH_REDEF_TABLE('SCOTT','R_TEST','RTEST_HOLD') PL/SQL PROCEDURE SUCCESSFULLY COMPLETED. SQL> SELECT * FROM R_TEST; DEPT_ SALARY ----- ---------- AAAA 1238.9 BBBB 4329.3 SQL> DROP TABLE RTEST_HOLD; TABLE DROPPED. SQL> DESC R_TEST; NAME TYPE -------------------------------- ---------------------------- DEPT_CODE CHAR(5) SALARY NUMBER(7,2) Copyright © Howard Rogers 2001 10/17/2001 Page 4 of 4