쿼리를 실행할 때 다음 오류가 발생합니다.오류 : EXIST 예약어를 사용하지 않고 둘 이상의 필드를 반환 할 수있는 하위 쿼리를 작성했습니다.
You have written a subquery that can return more that one field without using the EXIST reserved word in the main query's FROM clause. Revise the SELECT statement of the subquery to request only one field.
이 내 선택 성명 :
이sql = "SELECT (SELECT * FROM Data WHERE ProductDate = '" + yesterday + "' "+"AND EndTime > '" + endTime + "'), " + "(SELECT * FROM Data WHERE ProductDate = '" + todayDate + "' " + "AND EndTime = '" + endTime + "')";
목적은 하나 개의 쿼리로 모두 선택 문을 쿼리하는 것입니다. 어떻게하면됩니까?
조인 또는 유니온 모두. – jarlh
'JOIN' 연산자 사용 –
합집합 또는 합집합 사용 –