|
Subject:
|
Add Function
|
|
Posted By:
|
deontae45
|
Post Date:
|
9/25/2006 9:48:16 AM
|
How do I Add 1 to a column in a stored procedure?
Alexander Nelson Programmer
|
|
Reply By:
|
SQLScott
|
Reply Date:
|
9/25/2006 10:47:38 AM
|
Uh...not quite sure what you mean. Do you want to change the column name (for example, Name to Name1) or do you want to change a value in a specific column?
Scott Klein Author - Professional SQL Server 2005 XML http://www.wrox.com/WileyCDA/WroxTitle/productCd-0764597922.html
|
|
Reply By:
|
Jeff Mason
|
Reply Date:
|
9/25/2006 11:31:45 AM
|
Not sure I understand your question, but, for example, to add one to every column value for a particular column in a table:
UPDATE yourtable
SET yourcolumn = yourcolumn + 1
or to interpret your question another way:
SELECT yourcolumn + 1 as incrementedcolumn
FROM yourtable
What are you trying to do?
Jeff Mason Custom Apps, Inc. www.custom-apps.com
|