Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

INSERT from SELECT into a variable

$
0
0
Hi,

In MySQL, I have basket field call item_name in my order_basket table.

I want an SQL statement to take all item_name and INSERT it into a variable call param_details whch a TEXT type with a "\n" between them.

something like this

DECLARE param_details text;

INSERT CONTACT(item_name, "\n" INTO param_details FROM order_basket


How can I do this please?



Thanks,
Jassim

Viewing all articles
Browse latest Browse all 13329

Trending Articles