MYSQL動態SQL

set @b='department_big'; set @c='其餘'; set @a=CONCAT('select * from test.t where ',@b,'=? and department_small=\'其餘\' limit 10'); PREPARE st from @a; EXECUTE st USING @c; 一、只有值(字符串或數字或真假)能夠用佔位符?+using
相關文章
相關標籤/搜索