比如我想删掉第二行的记录,怎么写

解决方案 »

  1.   

    sql中没有第几行的概念,这个不是dbf数据库
    表中需要主键或者唯一索引之类
    delete from 表 where key1=xxx and key2=xxx ..
    这样才可以
      

  2.   

    --试下这样行不
    set @i =0;
    create table t 
    select (@i := @i + 1) as id0 ,  id,nm,tx from a;delete  from  t   where id0 = 2;
      

  3.   

    delete from yourtable where id=2依葫芦画瓢
      

  4.   

    Using temporary table can give you proper answer.