
- Learn MySQL
- MySQL - Home
- MySQL - Introduction
- MySQL - Installation
- MySQL - Administration
- MySQL - PHP Syntax
- MySQL - Connection
- MySQL - Create Database
- MySQL - Drop Database
- MySQL - Select Database
- MySQL - Data Types
- MySQL - Create Tables
- MySQL - Drop Tables
- MySQL - Insert Query
- MySQL - Select Query
- MySQL - Where Clause
- MySQL - Update Query
- MySQL - Delete Query
- MySQL - Like Clause
- MySQL - Sorting Results
- MySQL - Using Join
- MySQL - NULL Values
- MySQL - Regexps
- MySQL - Transactions
- MySQL - Alter Command
- MySQL - Indexes
- MySQL - Temporary Tables
- MySQL - Clone Tables
- MySQL - Database Info
- MySQL - Using Sequences
- MySQL - Handling Duplicates
- MySQL - SQL Injection
- MySQL - Database Export
- MySQL - Database Import
What is the alias to Show Tables in MySQL Result?
You can use AS command for alias to show tables in MySQL result.
Following is the syntax −
SELECT TABLE_NAME AS anyAliasName FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = DATABASE();
Let us implement the above syntax −
mysql> SELECT TABLE_NAME AS MY_TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = DATABASE();
This will produce the following output −
+------------------------------------+ | MY_TABLE_NAME | +------------------------------------+ | a | | accumulateddemo | | add10minutedemo | | add1toexistingvalue | | addanumbertocurrentvaluedemo | | addcolumnandindexdemo | | addingcurrentyeardemo | | addprefixtocolumndemo | | addtoexistingvaluedemo | | addtotaltimedemo | | addwhereclausedemo | | aggregatefunctiondemo | | allfiles | | allownulldefaulnotnulldemo | | allrecordsexceptlastone | | ampmtimedisplaydemo | | auto_incrementdemo | | autoincrementdemo | | autoincrementtabledemo | | averagedemo | | averagestring | | avoidinserterrordemo | | avoidinsertingduplicaterows | | avoidnulldemo | | b | | backtick_symboldemo | | bar | | binarykeyworddemo | | blobsizedemo | | booleandemo | | booleanevaluationdemo | | booltotinyintdemo | | bulkchangedemo | | calculateaveragedemo | | calculatepercentdemo | | calculatevaluedemo | | casefunctiondemo | | caseinsensitivedemo | | caseorconditiondemo | | castfunctiondemo | | casttypetobigintdemo | | changecolumnname | | charlengthdemo | | child_table | | childtable | | client_information | | clientdemo | | clients | | columndoesnotexists | | combinetwocolumnsdemo | | commadelimitedlist | | comparedayandmonthdemo | | comparetwostringdemo | | comparingtimestampdemo | | concatandlowerdemo | | concatenatingdemo | | contains_capital_letterdemo | | convertbooltointdemo | | convertnulltozerodemo | | convertnumbertominute | | correctdatetimedemo | | correlationdemo | | countallcharactersdemo | | countallrowsdemo | | countbooleanfielddemo | | countdifferentdemo | | countingrows | | countrowsdemo | | counttop10demo | | countvaluedemo | | countwithsubquerydemo | | coursedemo | | crc32demo | | createindexdemo | | createviewdemo | | currentweekdemo | | datedemo | | datedifferencedemo | | dateformatdemo | | dateortimedemo | | decimal_demo | | decimaldemo | | defaulmyisam | | defaultdemo | | defaultenginedemo | | delete_view | | deleteafterspacedemo | | deletedemo | | deletefrombasetabledemo | | deleterowdemo | | deleterowsolderthan5demo | | enumdemo | | equivalentdemo1 | | equivalentdemo2 | | errordemo | | eurosymboldemo | | eventdemo | | excludecertaincolumnsdemo | | existincommaseparatedlist | | extractfilenamedemo | | extracttuples | | findandreplacedemo | | findbestmatch | | findcapitallettrsdemo | | finddifferencedemo | | findinsetdemo | | findinvalidemailaddressdemo | | rownumberdemo | | rowsusinglimit | | scorecountdemo | | searchdateasvarchar | | searchingdemo | | searchingdemo2 | | second_table | | secondlastdemo | | secondreceivedemo | | secondtable | | seespacesdemo | | select1andlimit1demo | | selectalldemo | | selectallentriesdemo | | selectbeforeandafterdemo | | selectdaterangedemo | | selectdatesdemo | | selectdistinctdemo | | selectifdemo | | selectintoequivalentdemo | | selectorderdemo | | selectpartoftimestampdemo | | selectpermonthdemo | | selectperson | | selectrandomrecord | | selectrecordsdemo | | selectuniquevalue | | selfjoindemo | | set+0demo | | setallvaluesdemo | | setautoincrementdemo | | setfirstnameandlastname | | setzerodemo | | showsuminlastrowdemo | | sleepdemo | | sortcertainvalues | | sortedlistdemo | | specialcharactersdemo | | specifiedvaluesdemo | | sqlstatementsdemo | | stoproundingdemo | | stoproundingdemo2 | | storecsscolordemo | | storedproceduredemo | | storedprocedureinsertdemo | | storevalue0and1ornulldemo | | stringendswithnumber | | student_information | | student_table_sample | | subtotaldemo | | subtractvaluedemo | | sumdemo | | sumofeverydistinct | | sumtimedemo | | sumuntilcertainpoint | | syntaxofaltercommanddemo | | taxonomytable | | tbl1 | | tblupdate | | tematics_field | | ternaryoperationdemo | | texttotimestampdemo | | timedemo | | timestamp_tabledemo | | top2demo | | trimcommasdemo | | uniquebothcolumnvaluesamedemo | | uniquecountbyipadress | | uniquedemo | | university | | unixtimestampformatdemo | | unsigneddemo | | updatecolumndemo | | updatecolumnname | | updatedatedemo | | updatedemo | | updateifconditiondemo | | updatesettypedemo | | updatewithhighestdemo | | useofdesccolumnnamedemo | | useprocedure | | user_informations | | usercommentsview | | userdemo | | userinformation | | userinformationexpire | | userlogindetails | | userlogininformation | | userlogintimeinformation | | usertabledemo | | utfdemo | | valueascolumn | | view_table_demo | | viewautoincrementdemo | | viewtabledemo | | weeklyeventdemo | | whereaftergroupdemo | | wheredemo | | wheresetdemo | | wildcarddemo | | yesterdayrecordsdemo | | yourtable | +------------------------------------+ 408 rows in set (0.02 sec)
- Related Articles
- Only show tables with certain patterns in MySQL “show tables”?
- What is the MySQL alias shorthand?
- Group result in MySQL and show on list?
- MySQL show tables sort by table name?
- Write a MySQL query equivalent to “SHOW TABLES” in sorted order?
- What is the default sort order in MySQL tables?
- Show a MySQL user-defined variables values in the result table?
- What happens to MySQL temporary tables if MySQL session is ended?
- How to show all the tables present in the database and server in MySQL using Python?
- What is an alias in PowerShell?
- How to use an Alias in MySQL calculations?
- How to use alias in MySQL select query?
- What is the MySQL query to display the number of tables in a database?
- What is the meaning of ‘empty set’ in MySQL result set?
- What is a Cypress Alias?

Advertisements