How would you discover names of all tables in a database is a current SQL inquiries questions solicited to one from my companion. There are numerous approaches to locate every single table name shape any database like MySQL and SQL Server. You can get table names either from INFORMATION_SCHEMA or sys.tables based upon whether you are utilizing MySQL or Sql Server database. This is not a mainstream address like when to utilize truncate and erase or related versus noncorrelated subquery which you can expect all applicant plan well however this is very normal on the off chance that you are dealing with any database e.g. MySQL. In this SQL instructional exercise we will see cases of getting names of all tables from MySQL and SQL Server database. In MySQL there are two approaches to discover names of all tables, either by utilizing "appear" watchword or by question INFORMATION_SCHEMA. In the event of SQL Server or MSSQL, You can either utilize sys.tables or INFORMATION_SCHEMA to get every single table name for a database. Coincidentally in the event that you are new in MySQL server and investigating it , you may discover this rundown of regularly utilized MySQL server charges helpful.

SELECT table_name FROM information_schema.tables WHERE table_type = 'base table' AND table_schema='test';
+------------+
| TABLE_NAME |
+------------+
| department |
| employee   |
| role       |
| user       |
+------------+
4 rows in set (0.00 sec)

mysql> SHOW tables;
+----------------+
| Tables_in_test |
+----------------+
| department     |
| employee       |
| role           |
| user           |
+----------------+
4 rows in set (0.00 sec)

Related Posts:

  • Complain Management System : PHP Project Complain Management System : PHP Project Online Complain Management is a Web based project developed in PHP/MySQL which used to manage Customer’s complain Online. User can login, and Create complain, view complain detail… Read More
  • Vehicle Management System Vehicle Management System project in Java Vehicle Management System is developed and customized for commercial fleet owners and organizations. Its modules support most type of vehicles (passenger, Truck, construction and… Read More
  • Data Processing java project The Java Data Processing Framework (JDPF) helps you in the definition, generation and execution of standard and custom data processing. JDPF has been designed to be modular and estendable. For these reasons, we decided t… Read More
  • Mobile app function stopwatch timer messaging timer Following functions will be carried out by application Messaging Calculations Stopwatch Timer CLASSES There will be one class for calculator in which functions like add,subtract etc will be performed. Posted by GoVinD OzA… Read More
  • Registration form java project this is the simple and basic project which is used to fill the student information.It is a student registration form. In this you can add, delete search,update the records from the database. Posted by GoVinD OzA … Read More
by Govind Oza . Powered by Blogger.

PHP Frameworks

Popular Posts