Home > database >  Mysql query
Mysql query

Time:09-26

There is a table user (id, name, user_type, parent_id), user_type known as level 3, 1 -, 2 -, 3 - administrator
Now to write a query, the main business, such as: sales can distribution business, the administrator can assign sales can also assign, business sales can see their own businesses, the administrator can see their business and the distribution of regional sales business, now the administrator or sales to log in to see you can see all of the merchant

CodePudding user response:

Suggest you list your table structure, and provide the test data, and based on these test data that corresponds to the correct result,
Refer to the way the post questions http://bbs.csdn.net/topics/320211382

1. You create table XXX.. Statement
2. You insert into XXX... Statement
3. The result is what kind, and give a simple algorithm description)
4. Do you use the database name and version of (often asked in MS SQL server edition MySQL)

So people who want to help you to build the same environment with you directly, and in providing the test before, avoid the error in the text understanding,

CodePudding user response:

Your question a bit fuzzy, see detailed said

CodePudding user response:

MySQL data provided reference for the building Lord deep understanding of MySQL
  • Related