At 5:54 PM -0700 7/16/01, Bob Rea wrote:
>Still reading SQL in 10 Minutes, and here is the next problem, string
>concatenation in SELECT queries. The book has this query and this
>result. The other data is there in the table.
>
>mysql> select vend_city+', '+vend_state+' '+vend_zip
> -> from Vendors
> -> order by vend_name
> -> ;
>+----------------------------------------+
>| vend_city+', '+vend_state+' '+vend_zip |
>+----------------------------------------+
>| 44333 |
>| 44444 |
>| 99999 |
>| 11111 |
>+----------------------------------------+
>4 rows in set (0.01 sec)
>
>How do I do this in MySQL?
If + means concatenation, then try:
CONCAT(vend_city, ', ', vend_state, ' ', vend_zip)
>
>Alternatively, can anyone suggest a good tutorial for MySQL online
>that covers the topics the book does? The book's web site is at
>http://www.forta.com/books/0672316641/
I'd suggest reading chapter 5 of the MySQL Reference Manual to get
an idea of the differences between MySQL's SQL and other SQLs. That'll
give you some information about converting queries for MySQL.
>
>--
>Bob Rea
--
Paul DuBois, [EMAIL PROTECTED]
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php