select * from table_name where id not in (1,2);
id 字段是什么属性的?什么类型
条件语句where id != '1' and id != '2' --id字段为char、nchar、varchar型等等或where id != 1 and id != 2 --id字段为int、smallint型