delete table Table where bh=(select max(bh) from Table)

解决方案 »

  1.   

    1.除非你在执行之前开启了事务,否则是没办法回滚的
      要进行事务处理,首先要在执行数据操作之前开启事务:begin tran
      然后进行数据操作
      数据操作执行完成后,进行提交事务或回滚事务:commit tran 或 rollback tran
    在前台的处理和在查询分析器中都是一样,只不过,前进行事务处理是用你具体的数据连接源来进行.在查询分析器中是用命令2.
      delete from 你的表 where bh=(select max(bh) from 你的表)

      delete from 你的表 where bh=(select top 1 bh from 你的表 order by bh desc)
      

  2.   

    delete from 表名 where bh=(select max(bh) from 表名 )