Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

incrementing the number in table and then resetting the column

$
0
0
Hi All, I have four columns in my table, the first one is the identity column col1 Col1 col2 col3 1 12 1 This is Test1 2 12 2 This is Test1 3 12 3 This is Test3 4 12 4 This is Test4 5 12 5 @@@@@when, I see, @@@ sign in my col4, I need to restart the col3 from 1 again so it will look like this col1 Col2 col3 col4 1 12 1 This is Test1 2 12 2 This is Test1 3 12 3 This is Test3 4 12 4 This is Test4 5 12 5 @@@@@ 6 12 1 This is another test1 7 12 2 This is another Test2Is it possible to do that? Any help will be appreciated.

Viewing all articles
Browse latest Browse all 3145

Trending Articles