From the course: SQL: Data Reporting and Analysis
Unlock the full course today
Join today to access over 24,400 courses taught by industry experts.
Understand SQL indexes and keys - SQL Tutorial
From the course: SQL: Data Reporting and Analysis
Understand SQL indexes and keys
- [Instructor] In the up and coming sections, we want to join data together for more than one table. And for this, we need to understand a bit more about data types, keys, and indexes. Data type is whether a field is numeric or date or text, but as we've seen, there are far more categories than that. Keys and indexes are special kinds of field, and constraints are like rules that the database must enforce. So let's look at the customer table, and you can see we're on the Browse tab, and we can see all of the fields laid out horizontally, and the data beneath them. And then if we go to the Structure tab, we can see the same fields, but laid out vertically, and without the data showing underneath them. We have three ID columns, customer_id, store_id, and address_id. And these are all int type or integer type data, so these are all numeric. And they are, smallint, tinyint, and another smallint. And the number in the brackets…
Contents
-
-
-
-
-
-
(Locked)
Make your queries faster1m 47s
-
(Locked)
Understand SQL indexes and keys7m 16s
-
(Locked)
EDIT: Visualize your database7m 58s
-
(Locked)
Merge data across tables with JOIN5m 2s
-
(Locked)
Understand SQL JOINS4m 16s
-
(Locked)
Combine rows with SQL UNION4m 49s
-
(Locked)
Merge data across tables with IN2m 11s
-
(Locked)
Select from a selection with subqueries2m 56s
-
(Locked)
Challenge: Join tables1m 4s
-
(Locked)
Solution: Join tables4m 37s
-
(Locked)
-
-