I want to execute this code but I need one more variable that I dont know how to find.
I have this开发者_如何学C:
SELECT CODE = 'P1R2G1' and CATEGORY = '20M'
IF RANK op1 = '1'
THEN UPDATE tourneyeventgamesPuertoRicoVolleyballChampionship
SET ref = 'OP1 VALUE'
WHERE ref = '1P3R2G1' and
CATEGORY = '20M';
how can I change op1 value for what is actually in that field?
Lets say that I have USA in op1. I want USA to substitue 1p3r2g1
You have to use CASE statements if you want to show some other value based on the value that is found inside a column for a record.
精彩评论