/*==============================================================*/ /* Database name: Database */ /* DBMS name: ORACLE Version 10g */ /* Created on: 09/11/2009 18:02:15 AM */ /*==============================================================*/ -- SQL script that update fitBank squema -- To run this script from the SQL Plus, perform the following steps: -- 1. connect to the database -- 2. set define character to ! -- "set define !" -- 3. issue the command "@ " -- where represents the name of this script spool fitbank201062002.log alter table TRESIDENCIACODIGOCONTABLE drop constraint FKRESIDCODCON; alter table TRESIDENCIACODIGOCONTABLE drop primary key cascade; drop table TRESIDENCIACODIGOCONTABLE cascade constraints; /*==============================================================*/ /* Table: TRESIDENCIACODIGOCONTABLE */ /*==============================================================*/ create table TRESIDENCIACODIGOCONTABLE ( CRESIDENCIA VARCHAR2(3) not null, VERSIONCONTROL NUMBER default 0, CODIGOCONTABLE VARCHAR2(4) not null ); comment on table TRESIDENCIACODIGOCONTABLE is 'Definicion de los codigos contables por residencia de la persona'; comment on column TRESIDENCIACODIGOCONTABLE.CRESIDENCIA is 'Codigo de residencia'; comment on column TRESIDENCIACODIGOCONTABLE.VERSIONCONTROL is 'Manejo de optimistic loking'; comment on column TRESIDENCIACODIGOCONTABLE.CODIGOCONTABLE is 'Codigo contable asociado al tipo de empresa'; alter table TRESIDENCIACODIGOCONTABLE add constraint IPKRESIDCODCON primary key (CRESIDENCIA); alter table TRESIDENCIACODIGOCONTABLE add constraint FKRESIDCODCON foreign key (CRESIDENCIA) references TRESIDENCIAID (CRESIDENCIA); spool off