728x90 SW/SQL1 [SQL] Query 결과를 다시 Query하기 Query한 결과를 다시 Query하는 방법 SELECT * FROM (SELECT * FROM [테이블] WHERE [조건문]) AS [새로운 테이블 이름] WHERE [조건문] 예제 Table : member id age sex A 10 female B 14 female C 20 male D 25 male E 40 female F 11 male SELECT * FROM (SELECT * FROM member WHERE age>12) AS new_member WHERE sex ='female' id age sex B 14 female E 40 female 2020. 7. 2. 이전 1 다음 728x90