update table1 set numberfield = numberfield - 7
if numberfield is 30, then numberfield = 30 – 7, difference will be the new value of the field
More Related Contents:
- SQL Query needed for fetch value from Two identical table but not fully identical table
- Calculate Average of the largest values in multiple columns
- SQL Print the name of all Employees together with the name of their supervisor
- Storing JSON in database vs. having a new column for each key
- SQL: Repeat a result row multiple times, and number the rows
- How do I decide when to use right joins/left joins or inner joins Or how to determine which table is on which side?
- Why do results from a SQL query not come back in the order I expect?
- When to use SELECT … FOR UPDATE?
- Best practices for SQL varchar column length [closed]
- How to transpose rows to columns with large amount of the data in BigQuery/SQL?
- how to cast the hexadecimal to varchar(datetime)?
- Equivalent of MySQL ON DUPLICATE KEY UPDATE in Sql Server
- Why in SQL NULL can’t match with NULL?
- Convert SQL Server query to MySQL [duplicate]
- comparison of truncate vs delete in mysql/sqlserver [duplicate]
- Column calculated from another column?
- Error in MySQL when setting default value for DATE or DATETIME
- How does MySQL process ORDER BY and LIMIT in a query?
- sql join two table
- Is there a Profiler equivalent for MySql? [closed]
- Cast int to varchar
- Import SQL file into mysql
- How to export data from SQL Server 2005 to MySQL [closed]
- MySQL SELECT last few days?
- “where 1=1” statement [duplicate]
- How to migrate SQL Server database to MySQL? [closed]
- My SQL Dynamic query execute and get ouput into a variable in stored procedure
- Postgres LEFT JOIN with WHERE condition
- MySQL – Meaning of “PRIMARY KEY”, “UNIQUE KEY” and “KEY” when used together while creating a table
- SQL query with avg and group by