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.
Finding databases, tables, and columns - MySQL Tutorial
From the course: MySQL Essential Training
Finding databases, tables, and columns
- [Bill] Hi, I'm Bill Weinman. MySQL provides a set of statements for finding metadata about your database. These statements are specific to MySQL. Other database systems will have different statements for these functions. This lesson we'll use the scratch database, so here in Workbench I'll just type USE scratch. Now, if we want to see a list of databases available on this server connection, I can say SHOW databases. And again, this is specific to MySQL, but that'll give us a list of the databases available here. Now we have our album, scratch, and world databases, along with other system information databases which we're not concerned with for our purposes here. But within the scratch database, I can say SHOW tables and it'll give me a list of the tables in the scratch database. And so I have to use scratch in order to SHOW tables like that. If I want to see a description of the customer table, I can simply say, DESCRIBE customer, and this will give me information about the columns…
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
-
-
-
-
-
-
-