Re: ORACLE Describe Table
- From: "cbtguy_2000" <cbtguy_2000@xxxxxxxxx>
- Date: Sat, 30 Jun 2007 05:45:00 GMT
Thanks for your help.
That info was very helpful.
The following SELECT gives the basic same info as DESCRIBE
SQL> DESCRIBE BB_TAX
Name
Null? Type
----------------------------------------------------------------- --------
---------------
IDSTATE
NOT NULL NUMBER(2)
STATE
CHAR(2)
TAXRATE
NUMBER(4,3)
SQL> col column_name format a15
SQL> col data_type format a15
SQL> col nullable format a4
SQL> SELECT column_name, data_type,
2 data_length, data_precision,
3 data_scale, nullable
4 FROM user_tab_columns
5 WHERE table_name = 'BB_TAX';
COLUMN_NAME DATA_TYPE DATA_LENGTH DATA_PRECISION
DATA_SCALE NULL
--------------- --------------- -----------
--------------- ---------
----
IDSTATE NUMBER 22
2 0
N
STATE CHAR 2
Y
TAXRATE NUMBER 22
4 3
Y
"Mladen Gogala" <mgogala.SPAM_ME.NOT@xxxxxxxxxxx> wrote in message
news:pan.2007.06.30.01.24.18@xxxxxxxxxxxxxx
On Thu, 28 Jun 2007 23:02:02 -0700, cbtguy_2000 wrote:
Is it possible to execute the DESC tablename command using PHP to a
Oracle DB or is that a *SQLPlus command?
What SQL*Plus does is to describe a cursor. Describing USER_TAB_COLUMNS
is equivalent to describing a cursor "select * from USER_TAB_COLUMNS".
OCI8 has plenty of functions to do just that:
oci_num_fields
oci_field_name
oci_field_is_null
oci_field_precision
oci_field_scale
oci_field_size
oci_field_type
--
http://www.mladen-gogala.com
.
- References:
- ORACLE Describe Table
- From: cbtguy_2000
- Re: ORACLE Describe Table
- From: Mladen Gogala
- ORACLE Describe Table
- Prev by Date: Re: Custom PHP UI Components?
- Next by Date: Re: Question re: sql injection
- Previous by thread: Re: ORACLE Describe Table
- Next by thread: php generated images vs image file...which is better?
- Index(es):