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.
Finding databases, tables, and columns - MySQL Tutorial
From the course: MySQL Essential Training (2019)
Finding databases, tables, and columns
- [Instructor] People often ask, how do I find out what tables are in a database? Or how do I find out what columns are in a table? MySQL provides a set of statements for finding this kind of metadata about your database. These statements are specific to MySQL. Other database systems will have different statements for these same functionalities. So for this lesson, we'll use the Scratch database. I'll say use Scratch. And if I want to find a list of the databases available on this server connection, I would say show databases. And this will tell me all of the databases that are available on this server. If I need just a list of tables in a given database. I use that database. So I'm going to use Scratch and I say show tables. I can make that capital because that's actually part of the statement. And I'll execute both of these and we get a list of the tables in Scratch. If I need a list of the columns in a particular table, I can say describe and then the name of the table. And that…
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
-
-
-
-
-
-
-