手机外套批发:select * from im_users where Id = '"+id+"' and password = '11' 那里错了?
来源:百度文库 编辑:高校问答 时间:2024/05/21 22:55:06
select * from im_users where Id = '"+id+"' password = '11' 那里错了?
select * from im_users where Id = '"+id+"' and password = '"+password+"'
报错
java.sql.SQLException: Illegal mix of collations (gb2312_chinese_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation '='
到底那里错了?
select * from im_users where Id = '"+id+"' and password = '"+password+"'
报错
java.sql.SQLException: Illegal mix of collations (gb2312_chinese_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation '='
到底那里错了?
select * from im_users where Id = '"+id+"' and password = '11'
另外如果你的ID字段是数值型的,就这样
select * from im_users where Id = "+id+" and password = '11'
记得多条件查询,各个条件之间要用and或者or连接。
一般你应该是做为一个字符串的。
比如;
sqlString = "select * from im_users where Id ='"+this.tbxID.Text+"'";
其他的同样参照
少了条件连接符
select from where like
select *from 部系表
select sum(*) from...where.....
select count(*) from 学生
select * from table1 where id in (select id from table2),
SELECT SUM(工资) FROM 职工
select * from v$bgprocess 是什么意思
select * from (select a.*,b.kczwmc kcmc from (select kcdm,max(McjN) Mcj,Max(kcxz) kcxz from (select
selece *from table1,table2与select*from table1 union select*from table2的区别
"select count(*) Mycount from books "