Mysql queries different data sets based on different logon roles.

Source: Internet
Author: User
The code values of each role are different. The set that meets the conditions is identified based on the code value of the logon role. Column such as 51.135.24.03 (code value) Role 1 (code value: 51) login, contains 51 second ". all the previous data, the found code set is 51. XXX role 2 (code value: 51.135) login, contains 51.135 third ". "For all the previous data, the found code set is 51.135.XX. now we know the logon code value for each role. how can we use SQL statements to find the correct set?

The code values of each role are different. The set that meets the conditions is identified based on the code value of the logon role.
Column such as 51.135.24.03 (code value)
Role 1 (code value: 51) log on, take all the data that contains 51 before the second ".", and the found code set is 51.XXX
Role 2 (code value: 51.135) logs on, obtains all the data before the third "." of 51.135, and the found code set is 51.135.XX.
Now I know the logon code value of each role. how can I use SQL statements to find a set that meets the requirements?

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.