1
Consider the following scenario for controlling license information in a database
Products
1 - Solução x
2 - Solução y
3 - Solução z
Suppose the Customer has the 3 solutions
Licence table
| ID | CLIENTE_ID | PRODUTO_ID | DATA_VALIDADE_INICIAL | DATA_VALIDADE_FINAL |
| 1 | 11222 | 1 | 2015-01-01 | 2016-01-01 |
| 2 | 11222 | 2 | 2015-01-01 | 2016-01-01 |
| 3 | 11222 | 3 | 2015-01-01 | 2016-01-01 |
My goal is to update the license term of all products to a specific customer.
I initially used the following instruction to update all customer licenses, see :
UPDATE licenca
SET
data_validade_inicial= '2016-01-01 00:00:00',
data_validade_final= '2020-01-01 00:00:00'
WHERE cliente_id = 11222
I would like to improve this functionality for example if the customer wishes to update only two licenses in a single action how can I implement this ?
By "upgrade only 2" we must understand product 2 ?
– Motta
updated the question I’m sorry
– stringnome