Home > front end >  New questions, how to extract data that is not repeated
New questions, how to extract data that is not repeated

Time:09-17

Table: dbTabe

The field name: id dbkey

Data: 1 A

2 A, B

3 B, C


How to don't repeat data extraction front-end display A B C like this


I use SQL="select DISTINCT dbkey from dbTabe" display or A, A, B, B, C this way

CodePudding user response:

If the data volume is small, stupid way: read it out completely, make a circulation of judgment

CodePudding user response:

Your statement is not clear, what is your actual usage and field values?

CodePudding user response:

Only a C means, come out?

CodePudding user response:

Apparently, the SQL statement alone doesn't work, can only be all out and then use process,
Or you can first to store your database in strict accordance with the dbkey field only one letter way, in terms of the current can only is to use the above methods,
  •  Tags:  
  • ASP
  • Related