sql 临时变量用法

SELECT * FROM addressbook res,(select @i:=1 ) i where res.id=@i;

注意:
临时遍历赋值时前面有个冒号

你可能感兴趣的:(sql 临时变量用法)