string sqlcqsscstring = "if not exists (select 1 from Users where UserName= @UserName begin INSERT INTO Users VALUES(@UserName,@UserPassWord) end";
[quote=引用 3 楼 daixf_csdn 的回复:] 最简单的方式,是UserName加唯一索引。 你要用sql判断,就拆开写呗,为什么一定要一句sql做完?
最简单的方式,是UserName加唯一索引。 你要用sql判断,就拆开写呗,为什么一定要一句sql做完?
神了!!数据库是你设计的??为什么不用主键?
111,094
社区成员
642,554
社区内容
加载中
让您成为最强悍的C#开发者
试试用AI创作助手写篇文章吧