can't run CTEs in query console

已回答

Whenever I tried to run a query with CTEs (subqueries), PyCharm always run it in separate statements (even I selected the whole script to run)... Sample query:

```

WITH a AS (

SELECT *

FROM TABLE

)

SELECT COUNT(*)

FROM a;

```

and it always ran in two statements and of course both failed.

Is this not supported or is there a tool can help?

Any help would be appreciated, thanks!

0

what is your DBMS?

let's try this - go to File | Settings | Tools | Database -> set 'For selection execute' to 'Exactly as one statement' and check again.

1
Avatar
Permanently deleted user

it works, thank you Yuriy!

0

请先登录再写评论。