我想用声明一个 column 的变量,并在语句中使用。发现不允许。假设 tbl 中有一列叫 Win:set @col := 'Win';
select * from tbl where @col > 10;这样结果为空。看起来它解析成 'Win' > 10 了。有其它方法吗?