Are You Qualified to Use Null in SQL?
The blog post features a quiz to test knowledge of NULL in SQL, covering various operations and complexities, and serves as an educational resource for users seeking to improve their SQL skills.
Read original articleThe blog post from Project:M36 presents a quiz designed to test knowledge of using NULL in SQL. It includes various SQL queries categorized by difficulty levels, demonstrating how NULL interacts with different SQL functions and operations. The quiz covers topics such as boolean operations with NULL, aggregation functions like SUM and AVG, and the behavior of NULL in JOINs, constraints, and GROUP BY clauses. The post emphasizes the complexities and potential pitfalls of handling NULL values in SQL, highlighting that a database management system (DBMS) could theoretically be designed without NULL support. The quiz serves as an educational tool for those looking to deepen their understanding of SQL and NULL handling.
- The blog features a quiz to assess understanding of NULL in SQL.
- It includes SQL queries categorized by difficulty levels.
- The post highlights the complexities of NULL in various SQL operations.
- It suggests that a DBMS could be created without NULL support.
- The content serves as an educational resource for SQL users.
Related
At 50 Years Old, Is SQL Becoming a Niche Skill?
SQL, a foundational technology, faces scrutiny in today's IT world. Evolving roles like data scientists challenge its centrality. Debates persist on SQL's relevance against newer technologies like JSON queries, impacting its future role.
After a deacade of using SQL it "clicked" for me
Kyle Benzle reflects on understanding SQL after years, comparing it to a tool for structured data management. He emphasizes SQL as a program for data manipulation, highlighting key commands for efficient database management.
Sentinel-free schemas: a thought experiment
The article explores eliminating NULLs and sentinel values in database design for clarity and accuracy. It suggests using separate tables per attribute and explicitly defining missing data reasons. This approach enhances data integrity and readability.
Don't use null objects for error handling
The article critiques using null objects for error handling in programming, arguing it misleads users and propagates errors. It advocates for immediate error handling and context-based strategies instead.
SQL Iceberg
The article presents a SQL cheatsheet covering essential commands and advanced techniques, suitable for all skill levels, with practical examples to enhance understanding of database management and data analysis.
Those first two are entirely invalid in T-SQL. Even attempting to write it as SELECT IIF(NULL AND 1=1, 1, 0) doesn't work. The AND operation can only be applied to a boolean type and the only way to get that is as the result of a comparison and it can't be stored or passed anywhere.
Also the UNIQUE constraint does not allow insert of a second NULL. I tried that both using the constraint syntax and by creating a unique index.
Related
At 50 Years Old, Is SQL Becoming a Niche Skill?
SQL, a foundational technology, faces scrutiny in today's IT world. Evolving roles like data scientists challenge its centrality. Debates persist on SQL's relevance against newer technologies like JSON queries, impacting its future role.
After a deacade of using SQL it "clicked" for me
Kyle Benzle reflects on understanding SQL after years, comparing it to a tool for structured data management. He emphasizes SQL as a program for data manipulation, highlighting key commands for efficient database management.
Sentinel-free schemas: a thought experiment
The article explores eliminating NULLs and sentinel values in database design for clarity and accuracy. It suggests using separate tables per attribute and explicitly defining missing data reasons. This approach enhances data integrity and readability.
Don't use null objects for error handling
The article critiques using null objects for error handling in programming, arguing it misleads users and propagates errors. It advocates for immediate error handling and context-based strategies instead.
SQL Iceberg
The article presents a SQL cheatsheet covering essential commands and advanced techniques, suitable for all skill levels, with practical examples to enhance understanding of database management and data analysis.