摘要: Oracle中Decode函数,语句DECODE(tag,''ZCGS'',0,1)=decode(''@corp-No@'',''6010'',1,0) decode(字段或字段的运算,值1,值2,值3)这个函数运行的结果是,当字段或字段的运算的值等于值1时,该函数返回值2,否则返回值3当然值1, 阅读全文
posted @ 2020-06-09 16:52 红尘沙漏 阅读(12946) 评论(0) 推荐(1) 编辑
摘要: 注:MySQL中的模糊查询 like 和 Oracle中的 instr() 函数有同样的查询效果; 如下所示: MySQL: select * from tableName where name like '%helloworld%'; Oracle:select * from tableName 阅读全文
posted @ 2020-06-09 16:22 红尘沙漏 阅读(298) 评论(0) 推荐(0) 编辑
摘要: 这里有两张表TableA和TableB,分别是姓名表和年龄表,用于我们例子的测试数据 TableA id name 1 t1 2 t2 4 t4 TableB id age 1 18 2 20 3 19 在开发中我们的业务需求有时候是复杂的,多张表联合查询的时候是有多种方式的,面对不同的需求, 灵活 阅读全文
posted @ 2020-06-09 15:37 红尘沙漏 阅读(462) 评论(0) 推荐(0) 编辑
摘要: select * from 多张表的用法 其实就是 inner join select * from Class c,Student s where c.ClassID=s.ClassID select * from Class c inner join Student s on c.ClassID 阅读全文
posted @ 2020-06-09 15:25 红尘沙漏 阅读(9850) 评论(0) 推荐(1) 编辑
摘要: public ResultBean getSpfl(Integer yyb) { ResultBean res = new ResultBean(); try { JSONArray data = new JSONArray(); String sql = "select * from tspfl_ 阅读全文
posted @ 2020-06-09 14:51 红尘沙漏 阅读(331) 评论(0) 推荐(0) 编辑
摘要: 1.JSONObject : json对象,就是一个键对应一个值,数据是用 { } 来表示的,例如:{”id”:1 , “username”:”wp”} JSONArray: json数组,数据是是由JSONObject构成的数组,用 [ { } , { } , ...... , { } ] 来表示 阅读全文
posted @ 2020-06-09 13:45 红尘沙漏 阅读(2434) 评论(0) 推荐(0) 编辑