-
In SQL Plus there is a way to describe a tablename columname. I have been able to describe a particular columname without having to describe a big table.
Now it gives me a message saying:
DESC PORTFOLIO END_DATE
>Usage: DESCRIBE [schema.]object[@db_link]
-
Hi,
the describe option allows you to describe an object within a specific schema.
if you want to describe a particular column just perform:
select column_name,data_type,data_length,nullable from user_tab_columns
where table_name = 'EMP'
and column_name = 'ENAME';
you can put it in a procedure.
-
I know that is a way. But instead of writing the whole thing. You can easily use the desc command to describe the column as well....
-
Originally posted by niveditabajaj
I know that is a way. But instead of writing the whole thing. You can easily use the desc command to describe the column as well....
Would you care to explain with which tool you could do that? AFAIK in SQL*Plus you were never able to do so, at least not since Oracle6...
Jurij Modic
ASCII a stupid question, get a stupid ANSI
24 hours in a day .... 24 beer in a case .... coincidence?
-
I have been able to do it in SQLPlus with Oracle8,8i databases
-
Originally posted by niveditabajaj
I have been able to do it in SQLPlus with Oracle8,8i databases
This would be news to me. I would be interested if anybody knows if this is possible...
Jeff Hunter
-
To be more precise : DESC[RIBE] is a command of SQL*Plus, so it´s related with the SQL*Plus version : here I´m using 2 different SQL*Plus version, conected againts 2 different Oracle 7 versions :
SQL*Plus: Release 8.1.7.0.0 - Production on Mon Jun 18 15:39:04 2001
(c) Copyright 2000 Oracle Corporation. All rights reserved.
Connected to:
Personal Oracle7 Release 7.3.4.0.0 - Production
With the distributed, replication and parallel query options
PL/SQL Release 2.3.4.0.0 - Production
scott@oracle::SQL>desc emp
Name Null? Type
------------------------------- -------- ----
EMPNO NOT NULL NUMBER(4)
ENAME VARCHAR2(10)
JOB VARCHAR2(9)
MGR NUMBER(4)
HIREDATE DATE
SAL NUMBER(7,2)
COMM NUMBER(7,2)
DEPTNO NUMBER(2)
scott@oracle::SQL>desc emp ename
Name Null? Type
------------------------------- -------- ----
ENAME VARCHAR2(10)
scott@oracle::SQL>
==> and against Ora7 server :
SQL*Plus: Release 3.3.4.0.0 - Production on Mon Jun 18 15:41:38 2001
Copyright (c) Oracle Corporation 1979, 1996. All rights reserved.
Connected to:
Oracle7 Server Release 7.3.4.5.0 - Production
With the distributed and parallel query options
PL/SQL Release 2.3.4.5.0 - Production
SQL> desc emp
Name Null? Type
------------------------------- -------- ----
EMPNO NOT NULL NUMBER(4)
ENAME CHAR(10)
JOB CHAR(9)
MGR NUMBER(4)
HIREDATE DATE
SAL NUMBER(7,2)
COMM NUMBER(7,2)
DEPTNO NOT NULL NUMBER(2)
SQL> desc emp ename
Name Null? Type
------------------------------- -------- ----
ENAME CHAR(10)
SQL>
Regards,
Chiappa
-
This is not working in Oralce 8.1.7/SQL*PLUS 8.0.5
SQL> desc dba_users
Name Null? Type
------------------------------- -------- ----
USERNAME NOT NULL VARCHAR2(30)
USER_ID NOT NULL NUMBER
PASSWORD VARCHAR2(30)
ACCOUNT_STATUS NOT NULL VARCHAR2(32)
LOCK_DATE DATE
EXPIRY_DATE DATE
DEFAULT_TABLESPACE NOT NULL VARCHAR2(30)
TEMPORARY_TABLESPACE NOT NULL VARCHAR2(30)
CREATED NOT NULL DATE
PROFILE NOT NULL VARCHAR2(30)
INITIAL_RSRC_CONSUMER_GROUP VARCHAR2(30)
EXTERNAL_NAME VARCHAR2(4000)
SQL> desc dba_users username
Usage: DESCRIBE [schema.]object[@db_link]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|