易截截图软件、单文件、免安装、纯绿色、仅160KB

求助关于C#中的SQL问题!!!

"select * from dbo.Student where Student_id in(select Student_id from dbo.Student_Course where Course_id=(select Course_id from dbo.Course where Course_name ='"+ this.comboBox2.Text +"')) ";  这句话有问题吗?


private void Form2_Load(object sender, EventArgs e)
        {
         
            string constr = @"Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=学生系统;Data Source=(local)";
            SqlConnection conn = new SqlConnection(constr);
            DataSet ds = new DataSet();
            try
            {
                string sqlstr = "select * from dbo.Users  "
                    + "select * from dbo.Student  "
                    + "select * from dbo.Course  "
                    + "select * from dbo.Student where Student_id in(select Student_id from dbo.Student_Course where Course_id=(select Course_id from dbo.Course where Course_name ='"+ this.comboBox2.Text


相关问答:

C# DataSet导出xml 批处理(循环)得怎么处理

DataSet导出xml 批处理(循环)得怎么处理
XML文件
<A>
      <B>
        <C>
        </C>
  &nb ......

sql小小的疑问 - .NET技术 / C#

可能因为工作的原因 接触数据库这块比较少,之前都是做程序这块,数据库这块都有专门的人来做 分工都很明细 所以对数据库这一块完全不了解。前段时间 去面试了几家公司 几乎都是在数据库这块挂掉的 连个简单的SQ ......

求一sql语句 - MS-SQL Server / 疑难问题

现在有两张表:文章主表A(articleId,articleTitle),文章评论表B(commentId,articleId,commentTitle)
现在我想实现这样的功能:列出文章列表,其中每篇文章标题下面列出此文章的前2个文章评论,请问sql语句怎么写啊 ......

MS SQL作业问题 - MS-SQL Server / 应用实例

如何在SQL2005中设定定时作业,比如说定时清理某些表的数据,
或者是定时的将某些表的数据导出excel!
在线等待,急急急,最好是详细步骤!
之前我做的作业有点问题!
帮UP

参考:http://hi.baidu.com/toiota ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号