这个查询的查询是什么? [英] what is query for this query?
本文介绍了这个查询的查询是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
SqlCommand cmd = new SqlCommand(select * from user_login where groupid = Student,cnn);
我的user_login表groupid中的
包含3type日期(学生,讲师,管理员)
我必须从user_login中选择数据,其中groupid是Student。
但这个查询给出的错误如下:无效的collum名称学生。
什么是问题?
解决方案
试试这个
SqlCommand cmd = new SqlCommand( select * from user_login where groupid ='Student',cnn);
SqlCommand cmd = new SqlCommand(select * from user_login where groupid =''Student'',cnn);
使用单个''''代码然后执行此查询
i希望你的问题能解决解决,如果没有请发表评论
SqlCommand cmd = new SqlCommand( select * from user_login where groupid ='Student',cnn);
SqlCommand cmd = new SqlCommand("select * from user_login where groupid=Student", cnn);
in my user_login table groupid contains 3type date(Student,lecturer,admin)
I have to select data from user_login where groupid is Student .
but this query give error like : invalid collum name Student.
what is problem?
解决方案
try this
SqlCommand cmd = new SqlCommand("select * from user_login where groupid='Student'", cnn);
SqlCommand cmd = new SqlCommand("select * from user_login where groupid=''Student''", cnn);
used Single '''' code then execute this query
i hope your problem will solve if not please give your comment
SqlCommand cmd = new SqlCommand("select * from user_login where groupid='Student'", cnn);
这篇关于这个查询的查询是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文