| |

VerySource

 Forgot password?
 Register
Search
Author: catchu

Ask the heroes, can such a query be realized? ? ? ? ? ? ? ? ? ? ? ? ? ? ?

[Copy link]

0

Threads

35

Posts

22.00

Credits

Newbie

Rank: 1

Credits
22.00

 China

Post time: 2020-6-28 00:15:01
| Show all posts
update t
set column B = 12
where condition
Reply

Use magic Report

1

Threads

8

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 Invalid IP Address

 Author| Post time: 2020-6-28 16:30:01
| Show all posts
sinexe


   update t
set column B = 12
where condition
-----------------------------------
I want to use the query result you gave me when the condition is updated
Reply

Use magic Report

0

Threads

35

Posts

22.00

Credits

Newbie

Rank: 1

Credits
22.00

 China

Post time: 2020-6-28 19:45:01
| Show all posts
--Try
update t _a
set column B = 12
where exists(
    select 1
    from t
    group by column A
    having count(*) = 1
       and min (column B) <> '12'
       and _a.Column A = column A
       and _a.B column = min (column B)
)
Reply

Use magic Report

0

Threads

10

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 Invalid IP Address

Post time: 2020-6-29 12:45:01
| Show all posts
select * from t where column A = '0002' OR column B = '10'
can be realised
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list