搜索不包括某些记录的记录

 

string str = "select top 4 newsid,title,content from ent_news " +
                "where newsid<>(select top 1 newsid from ent_news order by newsid desc) " +
                "order by newsid desc";

string str = "select top 4 newsid,title,ent_img from ent_news " +
                "where newsid not in (select top 1 newsid from ent_news order by newsid desc) “+
                 "order by newsid desc";

你可能感兴趣的:(搜索)