Database connection for a single command

using single command database connection.

Following query joins the 5 table

Select * from table_A, table_B, table_C, table_E, table_E
where = AND = AND = AND = AND

ID is the primary key in table_A and it is foreign key in other table.


if u are using more database from same server than no need to many connection for that u just use a single connection to one of database and write a query for fetch data from more than one database as follows

Select db1.*,db2.* from db1.tablename as db1 inner join db2..tablename AS db2
on =
where db1 and db2 is database name


No responses found. Be the first to comment...

  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name: