0
How do you add +1 value by using update function?
2 Respostas
+ 10
UPDATE table_name
SET column_name = column_name + 1
WHERE (condition)
Example:
UPDATE Account
SET balance = balance + 1
WHERE customer_name = 'Saad'
Note: If you're talking about incrementing primary key, then there is an option called "auto-increment". Select that while creating the table.
+ 2
thankyou yeah i do know about auto increment :D i am just not used to sql yet