To add one to every value in the table…
UPDATE myTable
SET ID = ID + 1
To create a new value, one more then the previous highest (usually), use a column with IDENTITY
More Related Contents:
- How can I do an UPDATE statement with JOIN in SQL Server?
- SQL update query using joins
- Simulating group_concat MySQL function in Microsoft SQL Server 2005?
- The multi-part identifier could not be bound
- updating table rows in postgres using subquery
- Fastest way to update 120 Million records
- Can a Check constraint relate to another table?
- Is it possible to select sql server data using column ordinal position
- how can I Update top 100 records in sql server
- How to find current transaction level?
- How to insert multiple records and get the identity value?
- How can a LEFT OUTER JOIN return more records than exist in the left table?
- “select * from table” vs “select colA, colB, etc. from table” interesting behaviour in SQL Server 2005
- Dynamic SQL to generate column names?
- Extracting hours from a DateTime (SQL Server 2005)
- Column name or number of supplied values does not match table definition
- How to split string using delimiter char using T-SQL?
- SQL Server PIVOT perhaps?
- How to find consecutive rows based on the value of a column?
- Custom aggregate function (concat) in SQL Server
- Bulk/batch update/upsert in PostgreSQL
- How to escape square brackets inside square brackets for field name
- Functions with variable number of input parameters
- Average of multiple columns
- What is the internal representation of datetime in sql server?
- How to change column order in a table using sql query in sql server 2005?
- Why do SQL Server Scalar-valued functions get slower?
- SQL query for parent-child chain
- Querying Active Directory from SQL Server 2005
- Update a table with data from another table