Leveling up your mind

Notifications
Clear all

WITH Clause  

 
Sohaib
(@sohaib-ops)
Member Admin

The WITH clause stores the result of a query in a temporary table (temporary_movies) using an alias.

Multiple temporary tables can be defined with one instance of the WITH keyword.

 

 
WITH temporary_movies AS ( SELECT * FROM movies ) SELECT * FROM temporary_movies WHERE year BETWEEN 2000 AND 2020;

 

Quote
Posted : 06/06/2020 3:44 am