求教 关于数据库查询的问题
时间:2011-12-09
来源:互联网
想要按学号查询数据库中是否包含该数据项 返回bool值 该怎么操作啊
顺便问下
strSQL1="select * from student where code = studentid";
strSQL2.Format("select * from outgrade where code = %s",studentid);
strSQL的值有什么不同啊
顺便问下
strSQL1="select * from student where code = studentid";
strSQL2.Format("select * from outgrade where code = %s",studentid);
strSQL的值有什么不同啊
作者: continue23456 发布时间: 2011-12-09
if exist .....
作者: ouyh12345 发布时间: 2011-12-09
顺便问下
strSQL1="select * from student where code = studentid";
strSQL2.Format("select * from outgrade where code = %s",studentid);
strSQL的值有什么不同啊
但从这两句话,没什么区别
第一句是写死了,以后要改变studentid很困难
第二句则可以从参数里传studentid
strSQL1="select * from student where code = studentid";
strSQL2.Format("select * from outgrade where code = %s",studentid);
strSQL的值有什么不同啊
但从这两句话,没什么区别
第一句是写死了,以后要改变studentid很困难
第二句则可以从参数里传studentid
作者: ouyh12345 发布时间: 2011-12-09
可以通过查询返回的条目处理,如果是0 就没有值
顺便问下
strSQL1="select * from student where code = studentid";
strSQL2.Format("select * from outgrade where code = %s",studentid);
strSQL的值有什么不同啊
第一句输出为:select * from student where code = studentid
第二句输出为:select * from outgrade where code = studentid变量的值
顺便问下
strSQL1="select * from student where code = studentid";
strSQL2.Format("select * from outgrade where code = %s",studentid);
strSQL的值有什么不同啊
第一句输出为:select * from student where code = studentid
第二句输出为:select * from outgrade where code = studentid变量的值
作者: glovel0425 发布时间: 2011-12-09
"select count(id)as num from student where code =%s",studentid"
GetCollection(num);
这个语句中 num 是 整型还是 Cstring 类型
返回的是 符合条件的id 的个数 ???????
m_pDatabase-> ExecuteSQL(strSQL); 执行数据库有什么作用 啊 看到有些代码有加有些没加
GetCollection(num);
这个语句中 num 是 整型还是 Cstring 类型
返回的是 符合条件的id 的个数 ???????
m_pDatabase-> ExecuteSQL(strSQL); 执行数据库有什么作用 啊 看到有些代码有加有些没加
作者: continue23456 发布时间: 2011-12-10
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28