Change oraclestartwith to mysql

Source: Internet
Author: User
SELECTt. * FROM (SELECTDISTINCT (sm. menu_id), sm. up_menu_id, sm. menu_name, sm. menu_method, sm. leaf, sm. VALID_FLAGFROMsys_menusm, sys_role_menusrm, sys_rolesr, sys_user_rolesurWHEREsm.menu_idsrm.menu_idANDsrm.role_idsr.role_idAND... mysqlstart withoracle

SELECT t .*
FROM (select distinct (sm. menu_id ),
Sm. up_menu_id,
Sm. menu_name,
Sm. menu_method,
Sm. leaf,
Sm. VALID_FLAG
FROM sys_menu sm,
Sys_role_menu srm,
Sys_role sr,
Sys_user_role sur
WHERE sm. menu_id = srm. menu_id
AND srm. role_id = sr. role_id
AND sr. role_id = sur. role_id
AND sur. user_id = 3) t
Start with t. up_menu_id = 999999
Connect BY prior menu_id = t. up_menu_id

0 999999 system management
11 0 menu management
27 11 add menu operations
29 11 go to the modify menu page
30 11 modify menu operations
74 11 delete menu operations
12 0 role management
24 12 go to modify role
79 12 go to add Role
80 12 add a role
81 12 modify a role
107 delete a role
13 0 role menus
14 13 go to role menu binding
25 13 role binding menu operations
102 delete a role menu

This is oracle effect
How can I change to myslq?

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.