Si usted requiere algo como lo siguiente para colocarlo en su programa
TEXT SQL COLUMN_ID -------------------------------------------------------- ----- --------- " ,CUSTOMER_ID = CUSTOMER_ID "+ 1 1 " ,ACCOUNT_NUM = ACCOUNT_NUM "+ 1 2 " ,LNAME = LNAME "+ 1 3 " ,FNAME = FNAME "+ 1 4 " ,CUSTOMER_ID "+ 2 1 " ,ACCOUNT_NUM "+ 2 2 " ,LNAME "+ 2 3 " ,FNAME "+ 2 4 SQL> desc FOODMART.CUSTOMER Name Null? Type ----------------------------------------- -------- ------------- CUSTOMER_ID NOT NULL NUMBER ACCOUNT_NUM NOT NULL NUMBER(15) LNAME NOT NULL VARCHAR2(30) FNAME NOT NULL VARCHAR2(30)
Entonces utilize el siguiente script en ORACLE para obtenerlo. Solo debera indicar el esquema y la tabla. Y listo, a hacer COPY+PASTE.
-- TABS.SQL set echo off rem *********************************************** rem Columnas rem *********************************************** set verify off set linesize 320 set pagesize 2000 set numwidth 5 clear buffer accept owner_tabla prompt 'Ingrese esquema.tabla : ' select '" ,'||rpad(COLUMN_NAME,28,' ')||' = ' ||rpad(COLUMN_NAME,28,' ')||'"+' TEXT, 1 SQL, COLUMN_ID from all_tab_cols where OWNER||'.'||TABLE_NAME = trim(upper('&owner_tabla')) union all select '" ,'||rpad(COLUMN_NAME,28,' ')||' "+', 2, COLUMN_ID from all_tab_cols where OWNER||'.'||TABLE_NAME = trim(upper('&owner_tabla')) order by SQL, COLUMN_ID / clear breaks set numwidth 9 ttitle off set verify on set serverout on size 200000 set pagesize 2000 set linesize 80
0 comentarios:
Publicar un comentario