Home > database >  SQL update qualified data
SQL update qualified data

Time:10-10

Seek help, SQL:
Show that habiao
Column name -- -- -- -- -- -- -- -- -- -- -- - a -- -- -- -- -- -- -- -- -- -- -- -- b -- -- -- -- -- -- -- -- -- -- -- -- c -- -- -- -- -- -- -- -- -- -- -- -- d -- -- -- -- -- -- -- -- -- -- -- -- e -- -- -- -- -- -- -- -- -- -- -- --
fHa ha -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50 40 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 0 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 45-35 -- -- -- -- -- -- -- -- -- -- --
20Haha -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40 30 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 0 -- -- -- -- -- -- -- -- -- -- - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 45-25

SQL: update habiao set b=() - XX wehere hehe=XX;
XX is a user-defined input;
Question:
If XX is the number of the database, then subtract directly, if is not in the database of the Numbers, then subtract the largest number,
For example: XX=15;
The update habiao set b=(a) - 15 where hehe=15;
Such as XX=35
The update habiao set b=(e) - 35 where hehe=35;

Is there a realization of the query SQL statements?

CodePudding user response:

Column names is a \ b \ c or ha ha, ha, ha?

CodePudding user response:

The column name a \ b \ c
  • Related