About 50 results
Open links in new tab
  1. How to generate a Guid in SQL Server? - Stack Overflow

    Dec 20, 2016 · I need to create an Id as Guid in SQL(no identity) How I can do this? I defined the Id as uniqueidentifier but what is save in Db is 00000000-0000-0000-0000-000000000000

  2. sql - How to insert a NEWID () / GUID / UUID into the code editor ...

    Oct 11, 2014 · 7 For SQL server, and maybe others. One can insert a string-encoded Guid/uuid in SQL server using the convert function. See the zeroed Guid in the example below.

  3. sql - How to generate a new Guid in stored procedure? - Stack Overflow

    insert into cars (id, Make, Model) values('A new Guid', "Ford", "Mustang") So the primary key 'id' is a Guid. I know how to create a new Guid in C# code but within the stored procedure I'm unsure how to …

  4. sql server - Generating GUID - Stack Overflow

    Jan 2, 2013 · I am thinking to use a GUID in my .net app which uses SQL Server. Should I be writing a stored procedure which generates the GUID on each record entered or should I be directly …

  5. sql - generate guid for every row in a column - Stack Overflow

    Jul 24, 2013 · 9 I Have a stored procedure that has a table with one column and I need to generate a NEWID () for each row in that column. Would I only be able to accomplish this with a loop?

  6. sql - Adding a uniqueidentifier column and adding the default to ...

    Jul 4, 2016 · ALTER TABLE dbo.UserProfiles ADD ChatId UniqueIdentifier NOT NULL, UNIQUE(ChatId), CONSTRAINT "ChatId_default" SET DEFAULT newid() I want to be able to make …

  7. sql - How to create a deterministic uniqueidentifier (GUID) from an ...

    Aug 29, 2018 · This is about deterministically create such GUID's for test data, on a Microsoft SQL server. We are migrating our database away from integer identifiers to the uniqueidentifier data type.

  8. GUID. and automatic id as primary key in SQL databases

    1 create table your table (id int indentity (1,1) primary key, col1 varchar (10) ) will automatically create the primary key for you. Check GUID in the T-SQL, don't have it at hand right now.

  9. c# - Entity Framework auto generate GUID - Stack Overflow

    Aug 2, 2014 · You can set the default value for a column via fluent api or manually modify or create your migrations :) For SQL Server, just use newid() or newsequentialid() as default value 👍 In PostgreSQL …

  10. insert - Inserting GUID into SQL Server - Stack Overflow

    Jul 15, 2013 · You need single quotes around your GUID....it's just a string to sql server. You could try letting the sp generate the GUID with the sql function newid () ...sql server only i think.