Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 447845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T21:36:38+00:00 2026-05-12T21:36:38+00:00

Can any body please, give me some ideas here. I have a huge table

  • 0

Can any body please, give me some ideas here. I have a huge table with 189999 rows. I need to select only the middle values of it. How can I do it. I added unique identifier column. How do I insert the values in it. Please, suggest. i would really appreciate your helps.
I have accepted the answers not. I did not know how to do it before.
Thank you all

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T21:36:39+00:00Added an answer on May 12, 2026 at 9:36 pm

    This should work just fine.

    UPDATE table
    SET UniqueIdentifierColumn = NEWID()
    WHERE ...
    

    Notice that doing the update in a single set-based statement populates each row with a different GUID.

    Sample Code

    CREATE TABLE dbo.HugeTable (
        ColID       int     IDENTITY    PRIMARY KEY,
        ColGUID     uniqueidentifier,
        ColInt      int
    )
    
    DECLARE @ct     int
    
    SET @ct = 0
    WHILE @ct < 10 BEGIN
        SET @ct = @ct + 1
        INSERT INTO dbo.HugeTable (ColInt) VALUES (@ct)
    END
    GO
    
    SELECT COUNT(*) AS Ct FROM dbo.HugeTable
    
    UPDATE dbo.HugeTable
    SET ColGUID = NEWID()
    WHERE ColID BETWEEN 3 AND 7
    
    SELECT * FROM dbo.HugeTable
    

    Results

             Ct
    -----------
             10
    
          ColID ColGUID                                   ColInt
    ----------- ------------------------------------ -----------
              1 NULL                                           1
              2 NULL                                           2
              3 E45E13D8-CFF0-4FC7-B7C9-1D53E95C502D           3
              4 33C3CCBC-B6BB-4CAA-AB10-338AA95F366E           4
              5 82136767-396E-4B33-B9DD-FFD30FCF4680           5
              6 EFA24EC9-F8F9-47CF-839F-D588F69D167F           6
              7 546F7C14-BDDA-4226-B45C-B0DDCD43E7DB           7
              8 NULL                                           8
              9 NULL                                           9
             10 NULL                                          10
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can anybody give me a little advice please? I have a string, for example
Any body please can please help me, how to center a JFrame on Mac.
Please can anybody give me a answer for this, I have already tried sudo
Can anybody please help me with this as I have no idea why public
Can any body help me out how to clear the items in the list
I am working on Parsing right now, So can anybody please through some light
Any one please tell me how can i get an event after completion of
Any one can give the information about which tools are free for Defect Tracking/Logging
i have a c problem can any one help me . i wrote a
I have a table with dynamically changing rows items. Among the rows there is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.