SQuirreL SQL Client使用入门2---插件使用2
The multiple source query plugin allows SQuirreL users to create a virtual data source that may consist of multiple data sources on different servers and platforms. The user can enter one SQL query to combine and join information from multiple sources. Any database that has a JDBC driver is supported including NoSQL databases such as MongoDB.
The plugin uses features of the UnityJDBC driver to perform virtualization and translate functions that are not implemented by certain sources. For example, MSSQL does not support TRIM(), but you can do the same result using RTRIM(LTRIM()). Unity will automatically translate a TRIM() function specified in a MSSQL query to the correct syntax supported by the database.
Example TRIM() Translation for MSSQL
This translation is supported for common databases and can be freely extended by user-defined functions and translations for each database dialect.
EXPLAIN can be used to understand how a SQL query is translated to queries on individual sources.
第二个例子:
我们都知道,每个数据库的分页操作各有不同。
mysql-->limit
oracle--> rownum
MSSQL-->top
但是,使用了这个插件,分页操作都是 limit 了,也就是统一了部分数据库方言。
SELECT * FROM oracle.BASE_USER limit 10;
|
INSERT into xxTest.base_user select * from oracle_dev.BASE_USER a where a.USER_ID=‘admin‘;
select * from xxTest.base_user; select * from oracle_dev.BASE_USER; |
SQLState: null
ErrorCode: 0
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。