Тёмный

This Is Why People Put WHERE 1=1 In Their SQL 

Database Star
Подписаться 53 тыс.
Просмотров 4,8 тыс.
50% 1

📝 Get my free SQL Cheat Sheets: www.databasestar.com/get-sql-...
🎓 Learn and become confident in SQL: databasestar.mykajabi.com/sql...
Have you ever seen the statement "WHERE 1=1" in an SQL query?
In this video, I'll explain what it is and why people use it.
🔗 VIDEO LINKS:
Try This Technique To Speed Up Your Complex SQL: • Try This Technique To ...

Наука

Опубликовано:

 

18 дек 2023

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 23   
@joshi1q2w3e
@joshi1q2w3e 6 месяцев назад
Thank you so much! Ive always wondered about this!
@DatabaseStar
@DatabaseStar 6 месяцев назад
Glad it was helpful!
@higiniofuentes2551
@higiniofuentes2551 6 месяцев назад
Talking about tricks, In DB2 there are something very interesting is the "comment on table" and the "comment on field" statements. Very useful for documentation. When you are in quest to find the right data for giving the right information asked by the user. Do you know this in other SQL databases? Did you used? Thank you!
@DatabaseStar
@DatabaseStar 6 месяцев назад
That's good to know about the comment feature! I've used it in other databases but not often.
@chrisreisinger5002
@chrisreisinger5002 2 месяца назад
Thanks so much. Finally explained so I understand it.
@DatabaseStar
@DatabaseStar 2 месяца назад
Glad it was helpful.
@h.esther9400
@h.esther9400 6 месяцев назад
Thank you! I've been rewriting the "where" as I comment out the first condition and it's been very annoying! Now I know there's a better way.
@DatabaseStar
@DatabaseStar 6 месяцев назад
Glad I could help!
@higiniofuentes2551
@higiniofuentes2551 6 месяцев назад
Thank you for this very useful video!
@DatabaseStar
@DatabaseStar 6 месяцев назад
Glad it was helpful!
@dheerajs2838
@dheerajs2838 6 месяцев назад
This is good. thanks
@DatabaseStar
@DatabaseStar 6 месяцев назад
You're welcome!
@theBATfamiliar
@theBATfamiliar 6 месяцев назад
Thank you for sharing this, so is not related at all to performance ? - I was taught by a co worker that the 1=1 helped to improve performance
@DatabaseStar
@DatabaseStar 6 месяцев назад
You're welcome! No it's not a performance thing, as far as I know it has zero impact on performance.
@theBATfamiliar
@theBATfamiliar 6 месяцев назад
@@DatabaseStar thank you for your response sir 👍
@SaiDinesh_
@SaiDinesh_ 5 месяцев назад
Hii, I need some clarification on multiple nested subqueries and where clause for the those sub queries and scope of columns which are in the sub queries
@DatabaseStar
@DatabaseStar 5 месяцев назад
What do you need to clarify? Nested subqueries are hard.
@SaiDinesh_
@SaiDinesh_ 5 месяцев назад
@@DatabaseStar yes and scope for the columns which are used in each sub queries
@chazzwhu
@chazzwhu 6 месяцев назад
Been doing this for years and always get asked about it
@DatabaseStar
@DatabaseStar 6 месяцев назад
Same - I've been asked a few times as well.
@malcorub
@malcorub 2 месяца назад
I'm the annoying team member asking you why you do it. LOL My co-worker actually just enlightened me earlier this year as to why they do it.
@franckterence7831
@franckterence7831 2 месяца назад
Clinical
@DatabaseStar
@DatabaseStar 2 месяца назад
Thanks
Далее
Are SQL joins bad for performance?
8:21
Просмотров 6 тыс.
When to Use a Subquery in SQL
8:50
Просмотров 30 тыс.
220 volts ⚡️
00:16
Просмотров 359 тыс.
My little bro is funny😁  @artur-boy
00:18
Просмотров 4,2 млн
I loaded 100,000,000 rows into MySQL (fast)
18:27
Просмотров 176 тыс.
7 Database Design Mistakes to Avoid (With Solutions)
11:29
Stop using COUNT(id) to count rows
7:01
Просмотров 372 тыс.
6 SQL Joins you MUST know! (Animated + Practice)
9:47
Просмотров 110 тыс.
What is DATABASE SHARDING?
8:56
Просмотров 903 тыс.
Self Join in SQL
9:09
Просмотров 41 тыс.
Complex SQL Query: Watch Me Write It
15:10
Просмотров 6 тыс.
APPLE совершила РЕВОЛЮЦИЮ!
0:39
Просмотров 4,2 млн
Телефон в воде 🤯
0:28
Просмотров 1,2 млн