SQL CTEs (Common Table Expressions) - Why and How to Use Them

preview_player
Показать описание

SQL CTEs, or Common Table Expressions, are a helpful feature in SQL. They can help you clean up a query and make it easier to read, and are available in many vendors including Oracle, SQL Server, MySQL, and Postgres.

In this video, you’ll learn what a CTE is, why you would want to use one, see an example of transforming a query to use a CTE, and see the benefits of a CTE.

Timestamps:
00:00 What is a CTE?
01:13 Our sample data
01:51 Create a CTE
04:38 Benefits of using CTEs
06:27 CTE vs Temp Table

Links:
Рекомендации по теме
Комментарии
Автор

This is such a clear, concise explanation for CTEs. Thank you so much!!!

Grond
Автор

You know how to break this down so anyone (I'm 70) can learn. I will be back to your site to learn & grow. Thank you for sharing. East Coast Sr

ministerbo
Автор

Amazing. A+ explanation. My only feedback might be in your first example show the results of the subquery first, then show the whole query second. Cheers!

andynelson
Автор

this really helped me learn about CTEs, so thank you very much!!! Now I just need to learn what "recursive" means and find your video on hierarchical queries.

diamondsandlipgloss
Автор

Good Explanation.

Sir, Kindly make a video on Recursive Subquery Factoring in oracle. Thank you!

siddharthapenchala
Автор

hello there, god bless your efforts..I have a simple enquiry as new sql learner.
How are CTEs different from temporary tables?
Thanks for taking care of this.

hasanmougharbel
Автор

What is temp table ? does it mean View Table ?

MuhammadFahreza
Автор

please make a sequence of video play list

vivekkumarmishra
Автор

A CTE cannot have indexes and constraints *beyond what already exists*

MiningForPies
join shbcf.ru