skywalker (mail.supratim@gmail.com) writes:
Quote:
I am really really new to sql,please forgive my
ignorence.
>
here is my problem
>
I have this table named mis_outtrack
>
desc mis_outtrack;
+-------------+-------------+------+-----+---------+-------+
>| Field | Type | Null | Key | Default | Extra |
+-------------+-------------+------+-----+---------+-------+
>| pub_code | varchar(3) | YES | | NULL | |
>| status_flag | varchar(2) | YES | | NULL | |
>| user_id | varchar(15) | YES | | NULL | |
>| entry_date | date | YES | | NULL | |
>| pub_date | date | YES | | NULL | |
+-------------+-------------+------+-----+---------+-------+
Hm, are you using SQL Server at all? While the above would be a legal
table definition in SQL 2008, there is no DESC command in SQL Server,
and SQL Server you would not produce that output.
The query Plamen posted is 100% ANSI SQL as far as I know, so it
should work no matter the product. If not, you need to find a forum
for the engine you are using.
--
Erland Sommarskog, SQL Server MVP,
esquel@sommarskog.se
Links for SQL Server Books Online:
SQL 2008:
http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005:
http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000:
http://www.microsoft.com/sql/prodinf...ons/books.mspx