From the course: MySQL Essential Training
Unlock this course with a free trial
Join today to access over 24,800 courses taught by industry experts.
Selecting columns - MySQL Tutorial
From the course: MySQL Essential Training
Selecting columns
- [Narrator] Hi, I am Bill Wyman. A given table may have a lot of columns and you'll often be interested in only some of them. Selecting particular columns is easy, and here's how it's done. For this lesson, we'll use the world database here in MySQL Workbench. I'm connected with my admin connection and I'll type use world to select the world database and we'll select all of the rows and columns from the country table and order it by the code column. So I'll say select asterisk from country, order by code. And when I execute that, I get all of the rows and all of the columns from the country table. And it's ordered by the ISO code, which is in this first column, and it's titled code. Now the asterisk here is in the place where you list the columns you want returned in the query. The asterisk is simply a wild card that means all the columns. I'm just going to go ahead and copy and paste this. And in place of the asterisk, I can list particular columns. I could say name, code, region…
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
-
-
-
A brief overview of SQL4m 28s
-
(Locked)
Database organization2m 51s
-
(Locked)
Selecting rows5m 47s
-
(Locked)
Selecting columns2m 21s
-
(Locked)
Counting rows3m 5s
-
(Locked)
Inserting data3m 26s
-
(Locked)
Updating data4m 12s
-
(Locked)
Deleting data4m 10s
-
(Locked)
Joining queries across tables3m 57s
-
(Locked)
Finding databases, tables, and columns1m 24s
-
-
-
-
-
-
-