解释和分析如下带参数SQL语句的作用
1.string sqlTest = "select count(*) from users where usersname=@usersnaem and userspwd=@userspwd"; 统计用户名为‘rr’,密码为‘rr’的总人数
2.string sqlTest = @"select id from users where usersname=@usersname and userspwd=@userspwd";
查询用户名为‘zy’,密码为‘zy’的用户id是多少
3.string sqlTest = "select * from Users";
查询用户表里面的全部信息
4.string sql = "insert into users values(@a,@b,@c)";
为用户表添加一行记录,用户名为‘1’,密码为‘2’,用户昵称为‘3’的用户
5.string sql = @"update users set usersname=@a ,userspwd=@b, UserCompellation=@c where id=@d";
修改id为‘1’的用户的用户名为‘lz’,密码为‘lz’,昵称为‘haha’
6.string sql = @"delete users where id=@a"
删除id为‘36’的用户
7.string sql = "select id,usersname from users";
查询用户表里面id列和用户名列的信息
9.string sqlTest = "select top(1) cbid,cbstartdate from ConsumerBill where tableid=@tableid order by CBStartDate desc ";
查询消费票据表中餐桌编号为‘2’的编号和开单时间 然后按照降序排列并显示首条记录