See All PhotosTwo SigmaEngaged EmployerTwo SigmaAdd an InterviewAbout254Reviews--JobsMoreOverviewCompany OverviewLocationsFAQ254Reviews--Jobs680Salaries522Interviews162Benefits14PhotosFollow+Add an InterviewInterview QuestionDatabase Administrator Interview-New York, NYTwo SigmaWrite an efficient stored procedure to allocate unique integer ids.Tags:sqlAnswerAdd TagsFlag as InappropriateFlag as InappropriateInterview Answer1 Answer▲0▼CREATEPROCEDURE [dbo].[AllocateUniqueIntIds] AS BEGIN SelectABS(CAST(CAST(NEWID()ASVARBINARY(5))ASBigint))as UniqueIntegerId END Go /* Test the store proc */ Exec [dbo].[AllocateUniqueIntIds] //Not sure if this is the correct answerAnonymous on Feb 16, 2011Flag as InappropriateFlag as InappropriateInterviews>Two SigmaAdd Answers or CommentsTo comment on this, Sign In or Sign Up. Two Sigma CareersWe bring science to finance. At Two Sigma, we follow principles rooted in technology and data science as much as those found in financial... – MoreCommunityWorking TogetherWhat Drives Us This is the employer's chance to tell you why you should work for them. The information provided is from their perspective.