From the course: Advanced SQL: High Performance Relational Divisions
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Zero divisions - SQL Tutorial
From the course: Advanced SQL: High Performance Relational Divisions
Zero divisions
- [Instructor] Zero is a fascinating, yet extremely dangerous number. Handle zero incorrectly, and things can go horribly wrong. I highly recommend problems with zero by number five one of my all time favorite YouTube channels. In arithmetic, zero divided by any number other than zero results in a zero. Any number divided by zero, including zero is undefined and banned all together. In accordance with the IEEE 754 floating point standard a division by zero may result in positive or negative infinity, an exception, an error message, a especial not-a-number value, it can cause the program to terminate or crash the system altogether. I kid you not look up the standard. The relational equivalent of zero is an empty set. A relational division where the divisor is an empty set is kind of analogous to dividing a number by zero. When the dividend is an empty set, it is kind of analogous to a zero divided by a number. Arithmetic…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.