在MySQL中,我想创建一个新表,其中包含此查询中的所有信息:
select * into consultaa2 from SELECT
CONCAT( 'UPDATE customers SET
customers_default_address_id= ',
(SELECT a.address_book_id FROM
address_book a where
c.customers_id=a.customers_id order by
address_book_id desc limit 1), '
WHERE customers_id = ', customers_id,
';') AS sql_statement FROM customers c
where c.customers_id > 3894;
查询语句太长,浏览器无法显示连接操作,我需要这个来进行更新。