|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
I'm working on a project using mSQL and PHP (yes, Msql)...
The support for this database is not that great, and I love the devshed so... i wish to extract a large block of text, around 1100 characters, from a table in one database, that table consists of a field linked to another table in another database. my questions are: 1) is it possible to query across dbs??? 2) is a better db design to put the table to be queried in the database that contains the linked table??? thank you! =-=-=-=-=-=-=-=-=- justin_dago |
|
#2
|
||||
|
||||
|
Assuming that they are under the same mysql connection then this is not a problem.
i.e. Code:
select a.column_a, b.column_b from database_one.table_name as a inner join database_two.table_name as b on a.some_column=b.some_column |
|
#3
|
|||
|
|||
|
the database is
MiniSQL (mSQL) not mySQL... it should be the same. right?? i suspected the syntax would be similar to a regular join... just use the "dot" operator??? i'll try it.. thanks Onslaught!! how about the second question? what's your take on that? justin_dago Last edited by justin_dago : August 31st, 2002 at 01:42 PM. |
|
#4
|
||||
|
||||
|
Sorry, missed the missing y. In theory it should be the same though.
In reality, the way most of RDBMS use the term databases are just a replacement for the term schema. Because all of the data is stored in the same location it is easily accessible across different "databases" as long as your have appropriate rights granted to access each area needed. I personally think you should leave them in the most reasonable design possible. If this means seperate databases/schemas then so be it. I do this quite often in both DB2 and MySQL. |
![]() |
| Viewing: Dev Shed Forums > Databases > Database Management > Join across databases |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|