当前位置:网站首页>Get max value of a bit column - get max value of a bit column
Get max value of a bit column - get max value of a bit column
2022-06-24 18:18:00 【javail】
problem :
I have a SELECT request with 'inner join' in the joined table is a column with bit type. I have a connection table with “ Internal connection ” Of SELECT The request is a column of bit type .
I want to select 1 if in the joined table is at most one value with 1. If it is not the case the value will be 0. If there is at most one value in the connection table , I want to choose 1. If this is not the case , Then the value will be 0.
So If I have: So if I have :
PERSID | NAME1 | Toto2 | Titi3 | TataAnd the second table And a second table
PERSID | BOOL1 | 01 | 02 | 02 | 1I would like to have for result I want results
Toto -> 0Titi -> 1Tata -> 0I try this: I'll try this :
SELECT sur.* ,MAX(bo.BOOL) FROM SURNAME sur INNER JOIN BOOL bo ON bo.IDPERS = sur.IDPERSBut MAX is not available on BIT column.. So how can I do that? however MAX stay BIT Not available on column .. So what should I do ?
Thanks, thank you ,
Solution :
Reference resources : https://stackoom.com/en/question/jKbY边栏推荐
- How to start cloud native application development
- TCE was shortlisted as a typical solution for ICT innovation of the Ministry of industry and information technology in 2020
- How to use SEO to increase the inquiry volume?
- C language | printf output function
- Yum to install warning:xxx: header V3 dsa/sha1 signature, key ID 5072e1f5: nokey
- It is often blocked by R & D and operation? You need to master the 8 steps before realizing the requirements
- How does the chief information security officer discuss network security with the enterprise board of directors
- High quality defect analysis: let yourself write fewer bugs
- Five skills of selecting embedded programming language
- Three simple steps to quickly complete order data processing through workflow (ASW)
猜你喜欢

Ten excellent business process automation tools for small businesses

Project Management Guide: tips, strategies and specific practices

Top ten popular codeless testing tools

About pyqt5 to realize paging function (one window implements different interfaces)

Etching process flow for PCB fabrication

Five skills of selecting embedded programming language

Flutter dart regular regexp special characters $, () (IV)

Nacos cluster starts throwing set of SQL_ SELECT_ LIMIT is not support

The 'ng' entry cannot be recognized as the name of a cmdlet, function, script file, or runnable program. Check the spelling of the name. If you include a path, make sure the path is correct, and then

On software requirement analysis
随机推荐
Issue 39: MySQL time class partition write SQL considerations
[JS Framework] Failed to execute the callback function:
The country has made a move! Launch network security review on HowNet
Leetcode daily question solution: 717 1-bit and 2-bit characters - reverse order
On software requirement analysis
Several key points for enterprises to pay attention to digital transformation
Do you know CMDB?
Can the money invested in financial products be withdrawn at any time?
Top ten popular codeless testing tools
Flutter dart regular regexp matches non printing characters \cl\cj\cm\ck
The 'ng' entry cannot be recognized as the name of a cmdlet, function, script file, or runnable program. Check the spelling of the name. If you include a path, make sure the path is correct, and then
TCE was shortlisted as a typical solution for ICT innovation of the Ministry of industry and information technology in 2020
Tencent cloud TCS: an application-oriented one-stop PAAS platform
How does the chief information security officer discuss network security with the enterprise board of directors
Ten excellent business process automation tools for small businesses
Sword finger offer 10- ii Frog jumping on steps
How do yaml files and zmail collide with the spark of the framework, and how can code and data be separated gracefully?
Selection (032) - what is the output of the following code?
Selection (031) -cool_ How long can secret be accessed?
Use BPF to count network traffic
