Describe Table? (z/os - Os390)

I am running COBOL-DB2 batch (version 7.0 DB2) in Z/OS -OS390.I see very little documentation - in particular, illustrative examples, of the DESCRIBE TABLE syntax and what exactly gets populated to the SQLDA when the command is issued.In the following example (simplified from my current program whic ...

Describe Table

What is the equivalent of Describe table of Oracle in SQL server.I want to see the table fields for a table in SQL server any command?????TIA ...

informix does not support "describe table table_name" ??

in db2, oracle, we can get the schema of table by sql like:"describe table table_name",for informix, we can not do that, while the only way is to use dbaccess?disappointed!not sure, but possibly, "describe " is in sql standard 2003, right? ...

MySQL Question related to "Describe table"

Hello, i would like to make a question related to Describe table, I have a table which has its primary key (dvd_r_id) and a foreign key (pc_id). mysql> describe dvd; +--------------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +--------------+---- ...

DESCRIBE TABLE and php

I would like to use the DESCRIBE TABLE command in php to display table info. Any ideas how to do this? ...

Describe Table not working

does anyone know why when i send a "DESCRIBE table" query to MySQL its telling me i have a syntax error, I tried to the same code directly on the database not using PHP and it worked.. so im a lil confused! lolhelp. ...

MySQL DESCRIBE table; returns error

I was trying to alter the name of a field from 'relate_id' to 'block_id' in a table, called 'protocols', using the following statement: ALTER TABLE protocols CHANGE COLUMN relate_id block_id smallint(5) UNSIGNED; Now when I use DESCRIBE protocols;, I receive the following error: Unknown column 'rela ...

MySQL Error using describe table

I am new to mySQL. I installed mySQL 5.0.2 . I created a table in "mysql" database and when i use DESCRIBE tableName the server stops giving error message "mysqld.exe has encountered problem". This describe tableName command is not working for any of the already exisitng tables o ...

Oracle Describe Table inside PLSQL procedure

I am writing a procedure which takes tablename as input and displays columns present in table as output. How to describe a table inside a plsql procedure. Also how to display the columns, since each table will be having different number of columns. Please suggest. ...

Oracle Two 'describe table' statements on the same table return different results

All,We've a scenario where two separate db servers have the same table structures. For example, server A and server B each have Table A with columns A, B, and C. When running DESCRIBE on each, the output from server A returns A, B, C, however, the output from server B is B, C, A. Both create table s ...

Oracle describe table over dblink

this query runs and i get the resultsselect *from t_misure_ee@anubiswhere rownum < 4but this query does not runsDESCRIBE t_misure_ee@anubishow can i get the description of the table t_misure_ee? ...

describe table

Hi, is there a sentence in db2 as400 that shows a table structure like "desc <table>" in Oracle? ...

Oracle describe table from jdbc

Gurus,I need to get Table Schema from JDBC. I tried using following, but no luck....stmt = conn.createStatement();ResultSet rs1 = stmt.executeQuery("desc mytable");while ( rs1.next() ) { //line 36System.out.println(rs1.getString(1));}Here is exception:java.lang.NullPointerExceptionat creat ...

Oracle Describe Table

Describing a table, how can I set the columns width i.e.Name etc. ...

Oracle describe table details such as primary key

i want to know the primary key of the table. let say, when i : desc t_usg_bci;i got the output like this :Name Null? Type SERIAL_NO NOT NULL NUMBER(6)CALL_TYPE NOT NULL CHAR(3)BILLING_CLASS_CODE NOT NULL CHAR(1)SERV_TYPE NOT NULL CHAR(3)SERV_CLASS NOT NULL CHAR(1)DAT_CODE CHAR(3)BCI NOT NULL CHAR(8) ...

Oracle PL/SQL to describe table structures

If I understand this correctly, the DESCRIBE command can't be used in a stored PL/SQL procedure. If that is true, what PL/SQL statements could be used to describe several tables, say T1, T2, and T3? ...

Oracle describe table

I need to get information about a table in Oracle. In SQL Svr or Sybase I would use sp_help that displays all relelvant info about a table. What command or query could do the same thing in Oracle 10G? ...

Oracle Slow describe table and query

When I use descr table I got a slow answer. Using sqlplus I got a slow answer making a query to. The others clients sqlplus work fine (very fast). I have a Computer with 2GB RAM and 60GB HD free, pentium 2.66GHz and XP. This configuration is the same that run in others clients computer.AR ...

generate a nice table overview

Sometimes you'll need info about a table:- in which tablespace does it reside?- are there any views/triggers/etc defined?- howmany rows?- are all indexes really required by DB2?So I created a "generate script SQL". You run this SQL, capture the output in a file and edit this file (prefix: ...

MySQL how to get specific fields of table?

i have this command show fields from <table> describe <table> show columns from <table> these 3 will show the fields and its properties what i want is to show the fields but "with the type datetime only" to know what fields are for date.. can u help me? ...

What's the DB2 command for MYSQL's Describe command?

I'm afraid this DB2 forum seem pretty much dead with not much activity for my question to be answered. So, my question here is what's the DB2 equivalent for the MySQL's command for "DESCRIBE <table name>". Or does it work?I tried this "describe table <table name>" and ...

Printing table structure

Everyone :Is there a way to print a table's structure. I'd like something similar to the DESCRIBE <table> information. Thanks for the help.Sincerely,Dale Williams ...

Printing table structure

Everyone :Is there a way to print a table's structure. I'd like something similar to the DESCRIBE <table> information. Thanks for the help.Sincerely,Dale Williams ...

ISQL How to describe metadata

Hi, is there any way to describe table metadata in ISQL like Oracle's 'describe TABLENAME' ? ...

Mysql table could open

I have a problem to open and/or describe table. The errors I had aremysql_stgssl>desc ATL1_USER_DETAILS_VW;ERROR 1356 (HY000): View 'atl1.ATL1_USER_DETAILS_VW' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use themmysql_stgssl>select * from A ...

For each value in one table, select nearest value in another table?

This is pretty simple to describe:Table A & B both have a date field. I need a query/procedure which will do:SELECT A.date, { max(B.date) where B.date < A.date}Example: A.date B.date ====== ====== 10/10/2006 01/01/1999 01/04/2007 12/12/2006 Result: A.date Max B.date < A.date ====== ======= ...

mysql describe

How do I peform the MySQL "describe TABLE" function using PHP? Thx ...

Getting mysql table info via PHP

Can I retrieve a tables Field and Type elements via PHP using describe $table?I am trying to dynamically set the sizes a forms text inputs to equal those of the columns in the database. Examplemysql databasename varchar(30)forminput type="text" size="<?name varchar size?> ...

anyway to create a table

I know descrbe table in mysql.Is there anyway to return the actual CREATE TABLE string that would create the given table, or do I need to run DESCRIBE table [name], parse it out, and build the CREATE command.I'm wanting to copy a table quickly, to another equal table with a different name. ...

get field names when table empty

is there any way to get all field names in a mysql resultset when table is empty and inner join was used?ex:sql = 'select * from mytable inner join othertable on leftval=rightval';$result = mysql_query($sql);$i = mysql_num_fields() // returns false when no results// describe table doesn't work for i ...

Automatically create table columns from csv file for sqlite3

First off, I'm a real greenhorn so please forgive me asking questions which may be bleeding obvious, but I have searched and searched and cannot find an answer to my problem.I'm trying to import a CSV file into sqlite3 database in python. The CSV file has 56 columns though. Is there any way to creat ...

showing all table information

i need to be able to show general information tables in my database.i currently do a 'show tables' query to get the name of each table in the db.for each name i do a 'describe table' query to get more detailed information.however, i am having trouble looping through the array (it returns field names ...

Oracle a table with all column names in all tables

Is there a table that contains all column names in other tables? like the column 'table_name' in user_tables.I know describe table can view the column names in a table, but I want to be able to select the column names. ...

Oracle How can i get the create table sql script already used to create a table

It is known that "Describe table" gets the table definition.Is there a way to get the table definition sql script that already used to create the table itself (or may be created using enterprise manager) ? ...

Compare fields in a table

1. i got a material table wich contains the article number, a quantity input field, a max quantity field... How can i test that the input quantity is less than the max quant one ?2. The max quantity field has to be invisible so i have a hidden attribute for it. The problem is that the table shows an ...

Oracle Problems with External Table import

I am getting two different types of errors when loading an external table. I know why they are happening and I need to know what needs to be done so the data can be loaded properly into the table.The data is being loaded from a text file and all of the data is being loaded as text. First off, execut ...

MySQL can not select column of different databse table

it might be a stupid question, but I have problem showing information in a table... when I use the command "select * from table" it prints out all information. When I try to print specific fields, I have problems with two columns. "describe table" gives me the names of the column ...

problem in describing table

I wanted to describe the table. DESCRIBE TABLE SCHEMA.TABLENAMEbut i am getting an error:DSNT408I SQLCODE = -104, ERROR: ILLEGAL SYMBOL "HESSDB2W". SOME SYMBOLS THATMIGHT BE LEGAL ARE: :DSNT418I SQLSTATE = 42601 SQLSTATE RETURN CODEDSNT415I SQLERRP = DSNHSMS1 SQL PROCEDURE DETECTING ERRORD ...

DB2 UDB 7.2 Communication Error

We suddenly started facing this problem after the database restart yesterday. Before that everything was working fine. problem is as follows: We have a table and it's definition is as follows:************************************************** ********************db2 => describe table RuleColumn T ...

Help! SQLCODE=-802

I invoke the SQL statement of "insert into session.temp_tab select sdate,CDWBH,IHYLB1,sum(IFDL),sum(IGDL),sum(IPDL),s um(IDLHJ) from im.dl_origin_a group by cube(sdate,CDWBH,IHYLB1)" in my SQL procedure. DB2 returned the -802(SQLCODE) code. The structure of im.dl_origin_a is$ db2 describe ...

SQL1225N error

Iam using DB2 8.1 version on solaris.When iam trying to describe table iam getting the SQL1225N error,can anybody help me in this matter will be appreciated.. ...

<text> LIKE <column> || '%' or "startswith" function

I tried to do folliwing:db2 => select name from test where 'Super tester' like name || '%'But..SQL0132N A LIKE predicate or POSSTR scalar function is not valid because thefirst operand is not a string expression or the second operand is not astring. SQLSTATE=42824Is it possible to implement it in ...

Problem in writing file to db2 database

HaiI created the table to insert a clob data as followsdb2 => create table ctest(datas clob(65536))DB20000I The SQL command completed successfully.db2 => describe table ctestColumn Type Typename schema name Length Scale Nulls------------------------------ --------- ------------------ -------- ...

Functions to manipulate BLOB

DB2 UDB v7.2Given a table data that also contains BLOB, can we use functions to edit the contents of the BLOB based on a search condition on the same BLOB data?Example:db2 describe table blobtabid integerstats BLOBNow, the SQL...update blobtab set stats= <something> where stats = <something ...

strang warning on export

Here are the facts. If I telnet to my DB server, connect to database1 and export any table, I receive warning msg for each varchar column. For example,SQL3132W The character data in column "SUBJECT" will be truncated to size"128".The column is defined as varchar(128).Also, DESCRI ...

display only fixed digit numbers.

i have created a table "ref_nco6"db2 => describe table ref_nco6Column Type Typename schema name Length Scale Nulls------------------------------ --------- ------------------ -------- ----- -----NCO_CD SYSIBM CHARACTER 6 0 NoNCO_DET SYSIBM VARCHAR 120 0 YesUID SYSIBM CHARACTER 6 0 YesDT_ ...

getting parameters of SP

apart from looking in catalog tables ,is there any way by which i can get ddl for SP or atleast their parameterssame way as we can do in tables or indexesdescribe table eone.tsys_user_mstrdescribe indexes for table eone.tsys_user_mstr--Rahul Singh ...

MySQL Error 1 (HY000) Error Code: 2

I want creat a small database, this one of the manual (Pets and their name's etc.) Connection to the MySQL Server -> Succesful Create database ... -> Succesful Create table ... -> Succesful Describe table -> Unsuccesful If I want to describe the table which I created, I get the followed ...

cannot find not null in db2look for hierarchy tables definition

I don't know i would able to explain my problem or not. I have a hierarchy tables and i want to duplicate those hierarchy tables into other database. I tried loading data with export and import. but what i have seen after importing the data is the nullability characteristics of some columns are lost ...

Update Statement Tuning - Plan attached

A simple update involving two small tables takes nearly 8 hours to complete. I would appreciate if you can kindly help me to understand the root cause of this slowness.Environment:DB2 V8.1 FP 12 / AIX 5.3Both are non-partitioned tables..residing on a logically partitioned databaseTable1: STG.TB_FIN_ ...