You are here:   Home
Register   |  Login
728x90

Captured Technology - Blog

Minimize

Inserting a Unique Identifier (GUID) into a SQL Field

by Steve Patterson on Tuesday, December 30, 2008 8:15 AM

If you have a database which contains GUIDs as a column of a table, then inserting the unique identifier into the needed column is not always straight forward. I found that converting the needed value into a unique identifier makes adding it to the database error free.

INSERT INTO SOMETABLE(GUID_1)
SELECT CAST('B14BC077-F1DF-457C-9F7E-7CB9E0BC1CF3' AS UNIQUEIDENTIFIER)

Author
Steve Patterson

Latest technology news.

FaceBook

Minimize

Mobile Version

Minimize
Add CapturedTech - Technology Mippin widget

Translate

Minimize

Sponsors

Minimize

Categories

Minimize

Bloggers

Minimize
Bloggers - Meet Millions of Bloggers

u comment, i follow