sql 语句 根据每个主键 删除表

例如 当主键为一个的时候
delect from 表名 where id=@id;
当主键为 (主键一,主键二)时?
怎么删除 sql 语句怎么写?

delete from xxxx where id in(id1,id2);

delete from xxxx where id in(id1,id2); 这种方式正确的,,id1 id2 是你的值

delete 和 主键 没有必然关系.

delete from xxxx where id in(id1,id2);

你这问题是不是这样理解:比如学生表:主键为学号时:语句为:delete 学生表 where 学号 = 01
主键为学号和班级时 , 语句应该为: delete 学生表 where 学号 = 01 and 班级 = 01

一张表里能有两个主键