473,490 Members | 2,458 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

describe command

1 New Member
Is it possible to get just the type length from a describe command in db2?
Jul 23 '07 #1
3 2416
naval123
14 New Member
plz explain ur query....
Aug 14 '07 #2
Purple
404 Recognized Expert Contributor
Moved from Articles

Moderator
Aug 15 '07 #3
cburnett
57 New Member
I'm assuming you want the field lengths for each of the columns (rather like the Oracle VSIZE function).

Don't think the DESCRIBE command can do this. However there is a way to get what you require.

If you are describing a table then:

Expand|Select|Wrap|Line Numbers
  1. select colname, length from syscat.columns where tabschema = 'SYSIBM' and tabname = 'SYSTABLES' order by colno 
If you are describing a statement, it's a little more awkward:

Expand|Select|Wrap|Line Numbers
  1. create view abc as <select statement>
  2.  
  3. select colname, length from syscat.columns where tabschema = USER and tabname = 'ABC' order by colno
  4.  
  5. drop view abc
Aug 16 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
10152
by: Jan | last post by:
I store sql-commands in a database table. In the first step I get the sql command out of the database table with embedded sql. In the second step I try to execute the command, which i got from the...
1
1574
by: Bruce W.1 | last post by:
I want an XML file to describe hierarchical data where each node is different. Each node will contain different and varied other nodes. Describing this in an XML file would be easy but I'm having...
2
2348
by: _link98 | last post by:
Environment UDB 8.1 Fixpak 9 on Solaris (64bit instance). After connecting to the database as "my_user". There is an alias from my_user.mytable to XXX.mytable. There is no real table...
1
1508
by: Constantin Khatsckevich | last post by:
Hello! I need get ordered length of the varchcar field in PHP. But pg_FieldLength return -1 (it's right), but I need to get max length for this field. For example, create table t ( str...
0
2541
by: Taber, Mark | last post by:
Experimenting with Beta 8 on Windows; we got this message while running PC-SAS queries against a table with over 7 million rows. Which setting(s) should I be looking at? Thanks Mark R. Taber...
0
1244
by: kirby | last post by:
My db2 environement is as follows: Suse Linux on powerpc, with 64-bit DB2, 8.1 fixpack 8a. Db2 is installed on local drives, and all tablespaces/containers are on some some network attached...
12
4113
by: Serman D. | last post by:
Hi all, How do I describe non-table objects, like UDF functions and procedures, using db2's normal command line interface? Database server = DB2/LINUX 9.1.0 Express-C running on Linux 2.6...
8
11646
by: cbtguy_2000 | last post by:
Is it possible to execute the DESC tablename command using PHP to a Oracle DB or is that a *SQLPlus command?
2
11916
by: account locked | last post by:
I have a situation where an SQL View was created over several table - and the library containing the SQL view is going to be refreshed. When the refresh occurs we will lose the SQL view. I do...
0
7108
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6967
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
6847
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7352
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5445
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4565
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3078
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
618
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
272
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.