Home > Database > Mysql Tutorial > body text

ACCESS:跨数据库查询的SQL语句_MySQL

WBOY
Release: 2016-06-01 14:05:38
Original
1406 people have browsed it

Access

问题说明: 有时需要在两个或三个数据库的表中,通过相关关键字,查询获取所需记录集,用一般的SQL查询语句是实现不了的,可通过ACCESS的跨库查询功能实现。

解决方法: 例如“装材类型”和“装材”两张表是在不同的数据库中的,具体查询方法,如下:
@"Select * from 装材类型 as a INNER JOIN [;database=" AppDomain.CurrentDomain.BaseDirectory "装材.zc].装材 as b ON a.BH=b.LXBH"

详细解释: [;database=path;pwd=12].A
ACCESS的跨库是通过中括号实现的,包括路径,密码设置等;跨库的前提是已经打开了一个Connection。
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!