我正在使用HSQLDB,并有一条将数据合并到表中的语句:"AS VALS(A,B,C) ON USERS.NAME = VALS.B "WHEN MATCHED THEN UPDATE SET USERS.NAME = VALS.B, "WHEN NOT MATCHED THEN INSERT VALUES VALS.A, VALS.B, VA
this->db->select(name);$this->db->join('table1','(table1.id=0 AND table0.feild1= table1.feild1) OR (table1.id=1 AND table0.feild2 = table1.feild2)') // <--- how to write this
我想为第二个条件获得另一个新列,类似于我的第一个condition.My查询的获取方式如下 SUM(1) AS Usercount, feild (SELECT* (SELECT GROUP_CONCAT(DISTINCT code) AS feildNOT LIKE '%,%') AS DataUNION SELECT
SUM(1) AS Employ