有标识就好办了咯,select top 1 * from table where 字段='' order by bs asc
update 表名 set 字段名 = '更新值' where 标示字段=(select top 1 标示字段 from 表名 where 字段名 = '')
我给你个例子吧: update gree set password='123456' where ID=(select top 1 ID from doctors where password='' {order by ID desc}) 这段话的意思是更改Gree表中密码为空的一个用户的密码为123456。ID是自动递增的标识。如果顺序相反就加一个逆向排序字串。也就是{}中的。
不好意思,更正一下: update gree set password='123456' where ID=(select top 1 ID from gree where password='' {order by ID desc})
我再改: update gree set password='123456' where ID=(select top 1 ID from gree where password is null {order by ID desc}) 这样总行了吧!!哈哈
update tablename set FieldName = Value where id= (select min(id) from tableName where FielDName is null)
其实应该把空格的值也加上去 update gree set password='123456' where ID=(select top 1 ID from gree where (password in (null,'')) 这样就清了!
update gree
set password='123456'
where ID=(select top 1 ID from doctors where password='' {order by ID desc})
这段话的意思是更改Gree表中密码为空的一个用户的密码为123456。ID是自动递增的标识。如果顺序相反就加一个逆向排序字串。也就是{}中的。
update gree
set password='123456'
where ID=(select top 1 ID from gree where password='' {order by ID desc})
update gree
set password='123456'
where ID=(select top 1 ID from gree where password is null {order by ID desc})
这样总行了吧!!哈哈
where id= (select min(id) from tableName where FielDName is null)
update gree
set password='123456'
where ID=(select top 1 ID from gree where (password in (null,''))
这样就清了!