From the course: MySQL Essential Training (2019)
Unlock this course with a free trial
Join today to access over 22,600 courses taught by industry experts.
Selecting columns - MySQL Tutorial
From the course: MySQL Essential Training (2019)
Selecting columns
- [Instructor] A given table may have a lot of columns, and you may often be interested in only some of them. Fortunately selecting particular columns is easy, and here's how it's done in SQL. For this lesson we'll use the world database, so I'll type in here, USE world. And you'll notice that I am connected with my admin connection here in the MySQL Workbench. And so I'll execute this command, and we're using the world database. Now I can select from the Country table, so I say SELECT * FROM Country ORDER BY Code. And when I execute this you'll notice that I get the Country table. I get all of the columns, so I scroll side to side, there you see all the columns, and all of the rows. And this is because I used the asterisk here. The asterisk is in the place where you would list the columns you want returned in the query. The asterisk is simply a wildcard. It means all of the columns. You can select particular columns from the table by listing them in the SELECT statement in place of…
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 39s
-
(Locked)
Database organization2m 58s
-
(Locked)
Selecting rows5m 32s
-
(Locked)
Selecting columns2m 26s
-
(Locked)
Counting rows2m 2s
-
(Locked)
Inserting data3m 14s
-
(Locked)
Updating data3m 56s
-
(Locked)
Deleting data4m 47s
-
(Locked)
Joining queries across tables4m 8s
-
(Locked)
Finding databases, tables, and columns1m 40s
-
-
-
-
-
-
-