数据库中有一列,里面的值 或空或有值。 想更新这一列,将空值的部分添加数值,使更新后的值与原来的值不重复,最好是依次增长的顺序可以试试用identity函数 SQL code: declare @i int set @i=1 update tb set @i=@i+1,col=ltrim(@i) where col is null
select o_customer,o_price from orders having o_price >=avg(o_price) select o_customer,o_price from orders where o_price >=(select avg(o_price) from orders) 我感觉没有区别啊,怎么在mysql会有 ......