Java程序里面写SQL语句 String s=你好; “select * from stu w
Java程序里面写SQL语句Strings=你好;“select*fromstuwherestuNamelike''”like后面的单引号里面怎么写(把s(你好)添加进去...
Java程序里面写SQL语句
String s=你好;
“select * from stu where stuName like ''”
like后面的单引号里面怎么写(把s(你好) 添加进去) 展开
String s=你好;
“select * from stu where stuName like ''”
like后面的单引号里面怎么写(把s(你好) 添加进去) 展开
2015-08-26
展开全部
String s = "sf";
String sql = "select * from stu where stuName like '%"+s+"%'";
String sql = "select * from stu where stuName like '%"+s+"%'";
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询