From the course: Learning MySQL Development
Unlock the full course today
Join today to access over 24,900 courses taught by industry experts.
Refine SELECT queries - MySQL Tutorial
From the course: Learning MySQL Development
Refine SELECT queries
- [Presenter] Being able to precisely select columns in a table is an important step when using MySQL. In this video, I'll discuss several ways of modifying your basic select queries using the keywords "limit", "distinct", "as", and "order by". Using Limit is a way to test the output of queries or to examine the contents of tables without loading their entire contents. All the datasets you'll be working with in this course are orders of magnitude too small for "limit" to be really necessary, but it's best practice to use "limit" when selecting from a table unless you need to select all the data in that table. And in fact, the MySQL Workbench will automatically limit to 1,000 rows unless that's specifically overridden. To use "limit", add it to the end of a select statement. So if I "LIMIT 5", that will select just the first five rows. This is equivalent to "LIMIT 0, 5". The first parameter is the row to start on, row…
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.