12/13/2023 0 Comments Show tables mysqlHow to tell tables and views apartĭoes the SHOW tables command also show views? Despite the name, yes. ![]() Now we’re ready to proceed to more interesting examples. You’ve just seen the most basic way you can use the show tables command. + -+ Code language: SQL (Structured Query Language) ( sql ) MySQL SHOW tables: some practical examples You should see the tables being listed: + -+ Id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,Įmail VARCHAR( 100)) Code language: SQL (Structured Query Language) ( sql ) In the CoderPad MySQL sandbox, let’s create two tables: CREATE TABLE students ( So, there’s an opportunity to automate some tasks that simply wouldn’t be possible using a GUI. When using it, you can leverage clauses such as WHERE and LIKE to further filter the output.įinally, since this is a command, you can use it in scripts. Also, keep in mind that this command is super flexible. If the command line is all you have, show tables comes in handy. But what are the uses cases for it? After all, when using a MySQL GUI (graphical user interface) client, you can easily display the tables inside a database, typically in a tree.įirst, you won’t always have access to a GUI when interacting with MySQL. That’s pretty much it when it comes to defining the command. In MySQL, the show tables command is what you use to list the tables in a database. Also, you should have access to a MySQL local installation.Ī great way to do that is to use the CoderPad MySQL Sandbox to quickly and easily get started writing SQL as it’ll be your MySQL client for this article. First, I expect some basic MySQL and SQL knowledge. There are only two prerequisites if you want to follow along with the examples I’ll give. We’ll also cover how listing tables in MySQL compare with other RDBMSs (relational database management systems.) ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |