0

When I use these query, it is not working properly. What is problem?

enter image description here

WITH T1 AS
(select A, B  from TB1  where ~~  
union 
select A, B from TB1   where ~~ )
select A, B from T1 

This query works fine.

select * from (select A, B  from TB1  where ~~  
union 
select A, B from TB1   where ~~ ) AS T1
kids
  • 101
  • 1
  • 4
  • What's the version of your mysql? CTEs are supported from v8.0 only. – Shadow Sep 02 '20 at 01:23
  • when I check , the version is 5.7.X > show variables like 'version'; http://postgresguide.com/cool/ctes.html – kids Sep 02 '20 at 01:49

0 Answers0