Neil Chandler's DBA Blog

A resource for Database Professionals

#desc

Here’s a good tip In SQL*Plus, that I have learned only recently; You’re in the middle of typing in some SQL or a PL/SQL Anonymous block, and can’t remember the column name, or other table information? At the start of the next line type “#desc <table_name>” and the table is described but you keep in the same place in your edit. No need to stop.

NEIL @ orcl > declare
 2 l_dt date;
 3 l_txt varchar2(50);
 4 begin
 5 #desc test_tab1

 Name Null? Type
 ------------------ -------- --------------------------------------------
 ID_COL             NOT NULL NUMBER
 DATE_COL                    DATE
 TEXT_COL                    VARCHAR2(50)
 PAD_COL                     CHAR(50)
 5 l_date := sysdate;
 6 select text_col into l_txt.... 
 7 .
NEIL @ orcl >

You can teach an old dog, old tricks. Neat time saver.

About these ads

Written by Neil Chandler

11th December 2013 at 07:08

Posted in Uncategorized

Follow

Get every new post delivered to your Inbox.

Join 27 other followers

%d bloggers like this: