Hi Peter (and MySQL list),
On Wed, Jan 13, 2010 I (Ricardo Dias Marques) asked the following :
It would be convenient for me to get a list of those fields ordered by
field / column name.
... and on the same day, Peter Brawley peter.braw...@earthlink.net
kindly replied:
SELECT *
FROM
and the SHOW COLUMNS (or its synonym SHOW FIELDS) command:
MySQL :: MySQL 5.0 Reference Manual :: 12.3.1 DESCRIBE Syntax
http://dev.mysql.com/doc/refman/5.0/en/describe.html
MySQL :: MySQL 5.0 Reference Manual :: 12.5.5.5 SHOW COLUMNS Syntax
http://dev.mysql.com/doc/refman/5.0/en/show-columns.html
in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right
syntax to use near 'ORDER BY Field' at line 1
So, I went to read the online documentation about the DESCRIBE command
and the SHOW COLUMNS (or its synonym SHOW FIELDS) command:
MySQL :: MySQL 5.0
create a
table containing 10 INT columns, the result of show columns from should show
the Type column length of 3 with a maximum data allocation for the 10 rows of
30 bytes, and not ~2MB, as is currently the case.
And even, in a worse case, MySQL Dev decided to give the length back
column. NOTE: The
result's. I.e. why give such an arbitrary number of bytes/length when no
ENUM's or SET's are even in the result. The point being, even if you create a
table containing 10 INT columns, the result of show columns from should show
the Type column length of 3 with a maximum data
Since a couple of recent stable versions back (and more recently, MySQL
5.0.22), MySQL has been returning the column length (C API) of the 'Type'
column of a show columns from.. statement as being 196605 (almost 192KB),
when this column only really contains data in the region of 10 bytes
been returning the column length (C API) of the 'Type'
column of a show columns from.. statement as being 196605 (almost 192KB),
when this column only really contains data in the region of 10 bytes
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe
Hi,
I am trying to get all field names from my table that begin with
letter X or Y, however the following statement and many variations I
have tried produce an error:
SHOW COLUMNS FROM TABLE LIKE X% OR LIKE Y%
Any help here would be much appreciated :)
--
MySQL General Mailing List
For list
shaun thornburgh wrote:
I am trying to get all field names from my table that begin with
letter X or Y, however the following statement and many variations I
have tried produce an error:
SHOW COLUMNS FROM TABLE LIKE X% OR LIKE Y%
According to the manual, the pattern for SHOW COLUMNS is:
SHOW
Hi,
I am trying to get all field names from my table that begin with letter X or
Y, however the following statement and many variations I have tried produce
an error:
SHOW COLUMNS FROM TABLE LIKE X% OR LIKE Y%
Any help here would be much appreciated :)
--
MySQL General Mailing List
For list
Hi all,
I was wondering is it possible to use SHOW COLUMNS FROM tbl_name as a
subquery.
I tried something like this ( w/o success ):
SELECT * FROM tbl1 INNER JOIN (SHOW COLUMNS FROM tbl2) AS t2 WHERE t1.ID
=t2.field;
or
SELECT field FROM (show columns from Research.idefix);
Teemu
Teemu Kuulasmaa [EMAIL PROTECTED] wrote:
I was wondering is it possible to use SHOW COLUMNS FROM tbl_name as a
subquery.
I tried something like this ( w/o success ):
SELECT * FROM tbl1 INNER JOIN (SHOW COLUMNS FROM tbl2) AS t2 WHERE t1.ID
=t2.field;
or
SELECT field FROM (show
Hi Folks - simple Q from a newbie,
I'd like to return only the column names using something like show columns.
I'm using PHP to display db tables in html, with the headers of the html
table url'ed to sort the result by field.
It's easy when you hard-code the column names into the page, but I'm
I'm experiencing some unexpected and undesired behavior attempting to run
SHOW COLUMNS FROM TABLE using Delphi via ADO.
MDAC: 2.6 RTM
MyODBC: 2.50.37
O/S:Windows 98
MySQL: 2.23.24 (Linux)
I can run most queries just fine (ie SHOW TABLES, selects, etc.). However
any SHOW COLUMNS queries
j.urban writes:
I'm experiencing some unexpected and undesired behavior attempting to run
SHOW COLUMNS FROM TABLE using Delphi via ADO.
MDAC: 2.6 RTM
MyODBC: 2.50.37
O/S:Windows 98
MySQL: 2.23.24 (Linux)
I can run most queries just fine (ie SHOW TABLES, selects, etc.). However
SUBJECT: Re: ADO + show columns
j.urban writes:
I'm experiencing some unexpected and undesired behavior attempting to run
SHOW COLUMNS FROM TABLE using Delphi via ADO.
MDAC: 2.6 RTM
MyODBC: 2.50.37
O/S:Windows 98
MySQL: 2.23.24 (Linux)
I can run most queries just fine (ie SHOW TABLES
16 matches
Mail list logo