How To Write SQL Server Queries Correctly: IN and NOT IN

  Рет қаралды 523

Erik Darling (Erik Darling Data)

Erik Darling (Erik Darling Data)

Күн бұрын

Пікірлер: 14
@exupload93
@exupload93 Күн бұрын
Thank you so much for the stream of videos as each of it is a gem of its own. Anyone finding these videos anywhere through their MSSQL journey would find themselves in a far better position to understand what works under the hood of the Sql server engine. I hope more people find this channel and I'm definitely going to make this channel a must watch for anyone who wants to get sufficiently better at understanding how to write better quality queries. If i need any expert advice, i know who to connect with 🤣
@ErikDarlingData
@ErikDarlingData Күн бұрын
Thanks for the endorsement 😃
@SQLDevDBA
@SQLDevDBA 2 күн бұрын
11:33 NTEXT or XML is safest for all columns. Message brought to you by Storage Vendors.
@ErikDarlingData
@ErikDarlingData Күн бұрын
Pure-ly coincidental.
@SQLDevDBA
@SQLDevDBA Күн бұрын
@@ErikDarlingData wooooooah I didn’t have my helmet on for that. 🤣
@coding3438
@coding3438 Күн бұрын
It’s called 3VL. Three valued logic!
@ErikDarlingData
@ErikDarlingData Күн бұрын
Rolls right off the tongue, like the German word for squirrel.
19 сағат бұрын
At least explicitly creating temp tables with a proper primary key solves so many headaches (as in the stuff you will join it on). And if you make a mistake in the joins or do a union all instead of union filling the temp table you get an error that tells you exactly what is wrong instead of multiplying all the data... But what I mostly see people do is: select into and then create index on the filled table and then only read from it once. So I get why people are told to just not do it also....
@ErikDarlingData
@ErikDarlingData 18 сағат бұрын
There are many upsides to that approach. Fully parallel insert and index created with full scan statistics to name my favorites.
18 сағат бұрын
@@ErikDarlingData Right, that nonsense... I think that it can be faster to drop an index, then insert then re-create the index, then just doing an insert is just so stupid i refused to remember it. But usually you get the same benefit without re-sorting that much.
@ErikDarlingData
@ErikDarlingData 17 сағат бұрын
The sorting can be painful. It would be nice if indexing temp tables had some shortcuts.
@FlaggedStar
@FlaggedStar Күн бұрын
I totally understand picking NOT EXISTS instead of NOT IN, but I haven't seen any convincing argument for using EXISTS instead of IN.
@ErikDarlingData
@ErikDarlingData Күн бұрын
There isn’t much of one generally, unless you are playing additional tricks with the IN clause.
@SQLDevDBA
@SQLDevDBA 2 күн бұрын
…Mom… 😂
How To Write SQL Server Queries Correctly: Common Table Expressions
27:49
Erik Darling (Erik Darling Data)
Рет қаралды 669
How To Write SQL Server Queries Correctly: Subqueries
23:20
Erik Darling (Erik Darling Data)
Рет қаралды 1,1 М.
Une nouvelle voiture pour Noël 🥹
00:28
Nicocapone
Рет қаралды 9 МЛН
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 120 МЛН
How To Write SQL Server Queries Correctly: EXISTS and NOT EXISTS
20:03
Erik Darling (Erik Darling Data)
Рет қаралды 1 М.
How To Write SQL Server Queries Correctly: Apply
20:12
Erik Darling (Erik Darling Data)
Рет қаралды 719
Fundamentals of Selects
25:21
Smart Postgres
Рет қаралды 3,8 М.
Better Filtering With YEAR and MONTH Functions In SQL Server
11:25
Erik Darling (Erik Darling Data)
Рет қаралды 766
IF Branching In SQL Server Stored Procedures: Dynamic SQL!
18:56
Erik Darling (Erik Darling Data)
Рет қаралды 575
IF Branching In SQL Server Stored Procedures: Patterns And Problems
16:27
Erik Darling (Erik Darling Data)
Рет қаралды 917
A Little About Parameter Sensitive Plan Optimizations In SQL Server 2022
24:05
Erik Darling (Erik Darling Data)
Рет қаралды 522
Everything You Know About Isolation Levels Is Wrong - The Perils Of Read Committed
20:01
Erik Darling (Erik Darling Data)
Рет қаралды 380
How to Nest C.T.E's in SQL
23:47
SQL with Ant Johnson
Рет қаралды 30
Une nouvelle voiture pour Noël 🥹
00:28
Nicocapone
Рет қаралды 9 МЛН