Development – Leet 4 Life

Software Development Code Samples and More

Skip to: Content | Sidebar | Footer

Tag: NewID

Selecting The Same NewID (Unique Identifier) into the same Row

17 May, 2012 | T-SQL | By: Michael Merrell

If you have ever needed to select the same newly created unique identifier into multiple columns with a single select statement in T-SQL then you would have run into the same problems as me. It’s certainly not something that has a lot of uses as the majority of the time you are using the NewID method in T-SQL you will be inserting into a new table and if you need the same value for multiple columns then you are just duplicating data. Technicalities aside I ran into this issue and fought with it due to the fact that you can’t [Read More…]