This time I will show you how to use a SQL statementto querydifferent databases and one SQL statement to query different databasesWhat are the precautions? The following is a practical case, one Get up and take a look.
Requirements: A SQL statement queries related results from multiple databases and outputs them to the client
Investigation: springFrameworkcan configure multiple data sources; sql can also Multiple databases can be attached to one main database
Solution: Use theATTACH DATABASE
statement to add multiple libraries to the main library to achieve the function
Syntax:
ATTACH DATABASE 'DatabaseName' As 'Alias-Name';
Example:
ATTACH DATABASE 'C:\Users\Administrator\Desktop\sqlite_data.sq3' As 'sd';
I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the php Chinese website !
Recommended reading:
Creating image carousels with Vue
##How to operate tables in Bootstrap
JS gets the value in the first element in the select drop-down box
The above is the detailed content of How to query different databases with one SQL statement. For more information, please follow other related articles on the PHP Chinese website!