0% found this document useful (0 votes)
29 views1 page

Ora Tips

Tips on Oracle

Uploaded by

bhartiya_amit52
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views1 page

Ora Tips

Tips on Oracle

Uploaded by

bhartiya_amit52
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

SELECT

DBMS_METADATA.GET_DDL('TABLE', 'ITEM_COMMIT_AGG', 'INTAMPS') AS DDL


FROM DUAL;

desc all_tab_columns;

Select data_type from user_tab_columns where TABLE_NAME = 'YourTableName'

SELECT table_name,
column_name,
data_type,
data_length,
nullable
FROM cols
WHERE table_name='&YOUR_TABLE'
ORDER BY column_id

begin
for r in ( select column_name, data_type
from user_tab_columns
where table_name = upper('&&p_1')
order by column_id )
loop
dbms_output.put_line(r.column_name ||' is '|| r.data_type );
end loop;

select column_name, data_type


from all_tab_columns
where table_name = �YOURTABLENAME�

select dbms_metadata.get_ddl('TABLE','DEMO','RAJESH') FROM DUAL;

DBMS_METADATA.GET_DDL('TABLE','DEMO','RAJESH')
--------------------------------------------------------------------------------
CREATE TABLE "RAJESH"."DEMO"
( "NAME" VARCHAR2(9),
"DBID" NUMBER
) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "USERS"

You might also like