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
相关文章
相关标签/搜索