Reputation: 3949
I need some help . I have this command in mysql
SET SESSION group_concat_max_len = 200000
and
SELECT CONCAT( 'DROP TABLE ', GROUP_CONCAT(table_name) , ';' )
FROM information_schema.tables
WHERE table_schema = 'updates_temp' AND
table_name LIKE 'mg_%';" -s
how can I make it as one command .
Since I have error in
mg_=`mysql -u$dbUser -p$dbPass -e "SET SESSION group_concat_max_len = 200000 SELECT CONCAT( 'DROP TABLE ', GROUP_CONCAT(table_name) , ';' ) FROM information_schema.tables WHERE table_schema = 'updates_temp' AND table_name LIKE 'mg_%';" -s`
Upvotes: 2
Views: 30
Reputation: 8140
You should add a ;
mg_=`mysql -u$dbUser -p$dbPass -e "SET SESSION group_concat_max_len = 200000; SELECT CONCAT( 'DROP TABLE ', GROUP_CONCAT(table_name) , ';' ) FROM information_schema.tables WHERE table_schema = 'updates_temp' AND table_name LIKE 'mg_%';" -s`
Upvotes: 1