471,049 Members | 1,465 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,049 software developers and data experts.

how to display a text in a SELECT ?

Hi

It's probably a stupid question, but I can't find how to do that in
the MySQL documentation ...

I want to do the following query, or something like that:

SELECT id, "string"+id as text FROM ...

and the result should be:

id text
1 string1
2 string2
3 string3
... . ... for each id returned by the query

It looks stupid but I can't figure which operator (I tried '+', '.',
'|', '&') I can use for this purpose

Thanks for your help
krystoffff
Jul 19 '05 #1
3 1993
Try This:

SELECT id, CONCAT('string',id) as text FROM......

"krystoffff" <pr******@silesky.com> wrote in message
news:85**************************@posting.google.c om...
Hi

It's probably a stupid question, but I can't find how to do that in
the MySQL documentation ...

I want to do the following query, or something like that:

SELECT id, "string"+id as text FROM ...

and the result should be:

id text
1 string1
2 string2
3 string3
... . ... for each id returned by the query

It looks stupid but I can't figure which operator (I tried '+', '.',
'|', '&') I can use for this purpose

Thanks for your help
krystoffff

Jul 19 '05 #2
Try This:

SELECT id, CONCAT('string',id) as text FROM......

"krystoffff" <pr******@silesky.com> wrote in message
news:85**************************@posting.google.c om...
Hi

It's probably a stupid question, but I can't find how to do that in
the MySQL documentation ...

I want to do the following query, or something like that:

SELECT id, "string"+id as text FROM ...

and the result should be:

id text
1 string1
2 string2
3 string3
... . ... for each id returned by the query

It looks stupid but I can't figure which operator (I tried '+', '.',
'|', '&') I can use for this purpose

Thanks for your help
krystoffff

Jul 19 '05 #3
Try This:

SELECT id, CONCAT('string',id) as text FROM......

"krystoffff" <pr******@silesky.com> wrote in message
news:85**************************@posting.google.c om...
Hi

It's probably a stupid question, but I can't find how to do that in
the MySQL documentation ...

I want to do the following query, or something like that:

SELECT id, "string"+id as text FROM ...

and the result should be:

id text
1 string1
2 string2
3 string3
... . ... for each id returned by the query

It looks stupid but I can't figure which operator (I tried '+', '.',
'|', '&') I can use for this purpose

Thanks for your help
krystoffff

Jul 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

19 posts views Thread by dmiller23462 | last post: by
2 posts views Thread by mervyntracy | last post: by

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.