我有两个表website_availability和status_codes.And,它们之间有外键关系,them.status_codes是父表。我正在使用休眠。我需要在连接后从这些表中获得值的“列表”。我正在遵循这段代码。String selquery="select w.statusCode,w.updateTime,w.statusCodes.statusCodeValue from WebsiteAvailability
我希望有选择条件,就像column2中的值为null一样,然后根据column 1选择row,如果column2不是null,则根据column 2的值进行选择。我有一个很长的查询,在介绍 case when 然后之前很好,但是当我在查询中添加case时得到了ORA-00905。示例查询如下:
select * from table where table.testcolumn='some value' and ( case when table.column2