更新sql sql
UPDATE test t
SET brandcode = (
SELECT
`code`
FROM
ca_brand_code
WHERE
ca_brand_code.id = t.brandcode_Id
)
WHERE exists(select 1 from ca_brand_code t2 where t2.id = t.brandcode_Id);code
刪除記錄table
delete from 表名;
truncate table 表名;test