Hi,
I have a table with the column named as order contains value as 10
I need a select query to select this order value to be increment by 1 as 11 and also to add string as 'orderlist'
like 11 - orderlist
Thanks
Hi,
I have a table with the column named as order contains value as 10
I need a select query to select this order value to be increment by 1 as 11 and also to add string as 'orderlist'
like 11 - orderlist
Thanks
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Aravind GovindarajPosted Dec 5, 2022, 10:46 AM
In your query, you can do something like below
Declare @OrderValue = select Max(order) from tableName
select order from tableName => Which returns 10
Union
Select ISNULL(@OrderValue,0) + 1 AS order