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

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