Skip to content

Added between keyword #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions 02-crud-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,19 @@ Think of IN to be like any other operator. Just that it allows comparison with m

Hope you had a good break. Let's continue with the session. In this second part of the session, we are going to start the discussion by discussing about another important keyword in SQL, `BETWEEN`.

### BETWEEN

The "between" keyword in programming languages like SQL is often used to specify a range or condition for selecting data from a database. For instance, in SQL, you might use it like this:

```sql
SELECT * FROM products
WHERE price BETWEEN 10 AND 50;
```

This query would retrieve all products with a price between $10 and $50.

In general, the "between" keyword helps define a range or boundary for operations, whether it's in databases, programming, or mathematics.

### IS NULL Operator

Now we are almost at the end of the discussion about different operators. Do you all remember how we store emptiess, that is, no value for a particular column for a particular row? We store it as `NULL`. Interestingly working with NULLs is a bit tricky. We cannot use the `=` operator to compare a column with `NULL`. Example:
Expand Down