输入banner图图片脚本导航/分类

mysql-Mysql条件查询时记录的唯一id,有多个id并且已知的,该怎么查询

mysqlselectsql

已知id的值,比如
int pId[100];

CString sql;
sql.Format("select * from table_name where id!=%d and id!=%d and id!=%d .....",pId[0],pId[1],pId[2],.....);
难道是这样写吗?