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)
Tsvetelin Tsonkov
Instructor
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