StringBuilder strSql=new StringBuilder();
strSql.Append("insert into NicheInfo(");
strSql.Append("NicheTitle,NicheKey,Fatime)");
strSql.Append(" values (");
strSql.Append("@NicheTitle,@NicheKey,@Fatime)");
strSql.Append(";select @@IDENTITY");这张NicheInfo表中有4列 其中三列为NicheTitle,NicheKey,Fatime,还有一列为主键id列请问最后一句strSql.Append(";select @@IDENTITY") 在一个sql语句后加一个分号,再加
select @@IDENTITY 有何用意 什么意思 从没见过这样的
strSql.Append("insert into NicheInfo(");
strSql.Append("NicheTitle,NicheKey,Fatime)");
strSql.Append(" values (");
strSql.Append("@NicheTitle,@NicheKey,@Fatime)");
strSql.Append(";select @@IDENTITY");--其它select @@IDENTITY 返回主键自增列的最大值