执行插入语句时直接返回插入信息的自增id,判断是否为空

insert into userinfo(UserName,UserPass,RegTime,email)values('a','b',GETDATE(),'123@qq.com');select @@IDENTITY;

 

select * from student;
select fid,ISNULL(fname,'为空') from student ;

posted @ 2015-10-29 13:23  寒空孤鹰  阅读(345)  评论(0编辑  收藏  举报