From the course: Learning Azure SQL Querying
Unlock the full course today
Join today to access over 24,400 courses taught by industry experts.
Using conditional statements to only get the data you need - Azure Tutorial
From the course: Learning Azure SQL Querying
Using conditional statements to only get the data you need
- [Instructor ] Let's say you need to look up the green helmet by its product number. Change your where clause to say product number equals and within single quotes type HL-U509-G ending single quote in all capital letters and hit run. When you are passing in a string of text you want to surround it with single quotes. Also, if you don't match the case exactly as it's recorded in the field, like if you used a lowercase H instead of a capital H in the product number, the SQL server engine in Azure SQL will still find this record. This might work differently in different database engines, but there are always ways to do case sensitive and case insensitive searches if you need that functionality. If you want to get all the helmets based on their product number, change the equal sign to the keyword like and for the string inside of the single quotes change the G to the percent sign key and click run. The percent sign indicates…
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.
Contents
-
-
-
-
-
-
(Locked)
Selecting your new record4m 21s
-
(Locked)
Using conditional statements to only get the data you need5m
-
(Locked)
Sorting your data in SQL with the ORDER BY clause2m 5s
-
(Locked)
Joining together multiple tables for increased query results6m 17s
-
(Locked)
Challenge: Get products by price with the WHERE clause49s
-
(Locked)
Solution: Get products by price with the WHERE clause3m
-
(Locked)
-
-