I want field data without field name, how?

I want field data without field name, how?

am 19.07.2006 16:50:33 von Chenxi

hi all

I am retrieving data from mysql under linux. something like mysql -e
"select id from table1", I get output

id
1
2

but I dont want the field name "id" but only the data. How can I do it?
Thanks a lot.

Chenxi

Re: I want field data without field name, how?

am 19.07.2006 18:23:39 von Bill Karwin

Chenxi wrote:
> I am retrieving data from mysql under linux. something like mysql -e
> "select id from table1",
> but I dont want the field name "id" but only the data. How can I do it?

Here's how I would do it:

mysql -e 'select id from table1' | tail +1

Regards,
Bill K.

Re: I want field data without field name, how?

am 25.07.2006 05:16:57 von Michael Austin

Bill Karwin wrote:

> Chenxi wrote:
>
>> I am retrieving data from mysql under linux. something like mysql -e
>> "select id from table1", but I dont want the field name "id" but only
>> the data. How can I do it?
>
>
> Here's how I would do it:
>
> mysql -e 'select id from table1' | tail +1
>
> Regards,
> Bill K.


mysql> select a as ' ' from c;
+------+
| |
+------+
| 2 |
+------+


--
Michael Austin.
DBA Consultant
Donations welcomed. Http://www.firstdbasource.com/donations.html
:)