Last answered:

03 Oct 2022

Posted on:

01 Oct 2022

0

save query as a table

Hi, how can I please create a query, and than save it as a new table? like we do in Pandas where we save the results under a new variable... thanks..

1 answers ( 0 marked as helpful)
Instructor
Posted on:

03 Oct 2022

1

Hi Kfir!
Thanks for reaching out.

You can simply save the file and then you can use it. If you would like to save it in a variable you can use the following structure:

SET @v1 := (SELECT COUNT(*) FROM employees);
SELECT @v1;

Hope this helps.
Best,
Tsvetelin

Submit an answer