Help - Search - Members - Calendar
Full Version: CREATE TABLE WITH SERIAL IDENTITY NOT NULL,
Oracle DBA Forums > Oracle > Oracle Forum
Rockdrygo
HI, SOMEBODY HELP ME Please.

I wanna create one table with specific caracteristics, the first row will be data type serial, but i have error, continuation see my code.

CREATE TABLE LBR_COM_BANCARIA (
IdRefComBancaria_INT serial IDENTITY NOT NULL, (HERE IS THE ERROR)
NUC_STR varchar(22) NULL,
TipoCredito_STR varchar(20) NULL,
Institucion_STR varchar(40) NULL,
Cuenta_STR varchar(20) NULL
)


REALY, I DIDNT FOUND the solution.

regards.
HAL9000
Can you please post the release of Oracle, the DDL and the exact error message?
Rockdrygo
TNKS,

>[Error] Script lines: 1-2 --------------------------
ORA-00932: inconsistent datatypes: expected LBROKER.SERIAL got NUMBER 

[Executed: 7/07/08 01:59:59 PM CDT ] [Execution: 0/ms]


is posible so is bad build datatype serial?,

SORRY!!, I SPEAK SPANISH, AND MY ENGLISH IS NOT VERY GOOD, I HOPE YOU WILL BE TOLERANCE

add ddl.


CREATE TYPE serial as OBJECT (id numeric)

CREATE TABLE LBR_COM_BANCARIA (
IdRefComBancaria_INT serial IDENTITY NOT NULL, (HERE IS THE ERROR)
NUC_STR varchar(22) NULL,
TipoCredito_STR varchar(20) NULL,
Institucion_STR varchar(40) NULL,
Cuenta_STR varchar(20) NULL
)


INSERT INTO pbhuser.PBH_COM_BANCARIA(IdRefComBancaria_INT, NUC_STR, TipoCredito_STR, Institucion_STR, Cuenta_STR)
VALUES(5, 'ABCDEFGHIJ123456789013', 'COMERCIAL', 'SERFIN', '89899898988989898989')

correcto name table

INSERT INTO LBR_COM_BANCARIA(IdRefComBancaria_INT, NUC_STR, TipoCredito_STR, Institucion_STR, Cuenta_STR)
VALUES(5, 'ABCDEFGHIJ123456789013', 'COMERCIAL', 'SERFIN', '89899898988989898989')
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.