Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

updating unique key column

$
0
0

I have a integer column "ColumnX" and has a unique key on it. The records stored in the table are as follows,

CoulmnX            CatID

--------------------------------

101                       1

102                       1

103                       1

104                       1

105                       1

201                       2

202                       2

203                       2

204                       2

301                       3

302                       3

303                       3

304                       3

Now, I need each value of "ColumnX" to be an odd number without dropping unique key constraint. Any Idea?

Result Should be,

CoulmnX            CatID

--------------------------------

101                       1

103                       1

105                       1

107                       1

109                       1

201                       2

203                       2

205                       2

207                       2

301                       3

303                       3

305                       3

307                       3




Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>