Home > Software engineering >  Consult a database query problem?
Consult a database query problem?

Time:10-05

There are 20 fields such as table test respectively as "a b c d... "
The field type is True/False
Objective: to set which five fields for a query condition
Condition: let the most satisfy the conditions of all the data record

CodePudding user response:

SQL multiple field values combined scheduling problems

CodePudding user response:

Define a structure containing 20 variables representing your 20 field every time the query variable assignment control query statement

CodePudding user response:

refer to the original poster m0_37317477 response:
such as table test with 20 field respectively as "a b c d... "
The field type is True/False
Objective: to set which five fields for a query condition
Condition: let the most satisfy the conditions of all the data record


//which five query conditions, and then return to the most number of records?

CodePudding user response:

Write a stored procedure, the stored procedure returns the record up to five fields, according to the field name to splice SQL

CodePudding user response:

The
reference 3 floor lfchen response:
Quote: refer to the original poster m0_37317477 response:

There are 20 fields such as table test respectively as "a b c d... "
The field type is True/False
Objective: to set which five fields for a query condition
Condition: let the most satisfy the conditions of all the data record


//which five query conditions, and then return to the most number of records?


Single record for the most conditions, after the merging, number of records that's not necessarily the most comprehensive conditions
  • Related