Use left outer join and left OUTER join in Access database when querying user's permissions

Source: Internet
Author: User

The most common view is to make the left outer connection. and its role, especially when we query the user's current permissions is particularly obvious, we will be the permissions table is the module table put → role permissions table → role table → user role table → user table so that the left outer join connection, so that the user's permissions can be queried.

The left outer connection in the Access database is very special, it is first written inside and then gradually expanded to the end, first executed inside.

Example

SELECT Xt_user. Pkid, Xt_user. UserID, Xt_user. UserName, Xt_user. Password, Xt_user. Status, Xt_module. ModuleName
From (((Xt_module left JOIN xt_rolemodule on Xt_module. Pkid = Xt_rolemodule. Modulepkid) left JOIN xt_role on Xt_role. Pkid = Xt_rolemodule. Rolepkid) left JOIN xt_userrole on Xt_role. Pkid = Xt_userrole. Rolepkid) left JOIN xt_user on Xt_user. Pkid=xt_userrole. Userpkid;

Use left outer join and left OUTER join in Access database when querying user's permissions

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.