SQL Tricks | How to find value in multiple columns ?

SQL Tricks | How to find value in multiple columns ?

Learn at Knowstar

1 год назад

10,900 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Gustavo Adolfo Gómez Acevedo
Gustavo Adolfo Gómez Acevedo - 30.09.2023 13:48

Thanks!

Ответить
Shekhar K
Shekhar K - 16.08.2023 22:36

Oh my goodness, its very very helpful... Many thanks to you.

Ответить
Nakul Deep
Nakul Deep - 18.03.2023 07:01

Select gold as Player,count(1) from events k
where not Exists (Select * from events p where k.gold=p.silver)
and not exists (Select * from events C where k.gold=C.BRONZE)
group by GOLD

Ответить
siva chandar
siva chandar - 23.02.2023 00:40

As per your example from Tbl1, If I want to find demo in col1, col2, col2, col4, col5 ? Pls reply

Ответить
Mahesh P
Mahesh P - 02.02.2023 21:50

Hi ,
I want to find max date for each tables present in each schema how to write it dynamically

Ответить
SMC GPRA
SMC GPRA - 28.12.2022 08:50

I learnt lot from this channel, good explanation ma'am

Ответить
siddhesh amrutkar
siddhesh amrutkar - 22.12.2022 15:54

Nice Video.. But what if want to find only the Cancelled then in that case only two columns should appear..

Ответить
Nikolay Baranov
Nikolay Baranov - 22.12.2022 09:19

Yes, this script is functional. But:
1. Dynamic queries are evil. Supporting such code is very time consuming
2. Code is vendor dependent and not portable
3. I can hardly imagine a situation where the table name is known in the database, but the column names are unknown or they can change arbitrarily. The above example shows that the base is not even in second normal form. This is not a base, but complete chaos. Instead of writing queries to this database, I would rather quit.

Ответить
Abdullah Quhtani
Abdullah Quhtani - 21.12.2022 08:57

Excellent and will be great 💪🏼 if there is a way to loop all tables in a specific Database 🤔😏

Ответить
r k
r k - 21.12.2022 05:15

Nice ma'am..👍

Ответить
RB Entertainment
RB Entertainment - 21.12.2022 01:38

How to make this work in oracle

Ответить
Avi
Avi - 20.12.2022 20:17

Great video ma'am

One question
where 'cancelled' in (col1,col2) is available just in SQL server or is it universal?

Ответить
Kristy Owens
Kristy Owens - 20.12.2022 18:44

Please share more SQL tips and tricks.

Ответить
Amukelani Ebenezer
Amukelani Ebenezer - 20.12.2022 18:04

Thanks for sharing

Ответить
Anand Kumar
Anand Kumar - 20.12.2022 17:48

Hi Mam!
Can you do some mesium/ hard videos on sql leet code questions please...

Ответить