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 6026653
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T04:28:36+00:00 2026-05-23T04:28:36+00:00

For example I have this table: TableX: code name consecutive 0 a 0 2

  • 0

For example I have this table:

TableX:

code       name     consecutive
0          a        0
2          b        1
3          c        2
1          d        3
5          e        0
4          f        1
6          g        2
7          h        0
9          i        1
10         j        2
8          k        3

I want to do this:

code          name              consecutive
(0,2,3,1)     (a,b,c,d,e)       (0,1,2,3)
(5,4,6)       (e,f,g)           (0,1,2)
(7,9,10)      (h,i,j)           (0,1,2)
(8)           (k)               (3)
  • 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-23T04:28:37+00:00Added an answer on May 23, 2026 at 4:28 am

    SQL has no concept of “consecutive” in that sense. You’d have to define the grouping in your data model somewhere. There’s nothing to say that your table wouldn’t actually be stored in a different order like:

    code       name     consecutive
    0          a        0
    2          b        1
    6          g        2
    8          k        3
    5          e        0
    4          f        1
    3          c        2
    1          d        3
    7          h        0
    9          i        1
    10         j        2
    

    If you want to specify ordering in a table, it can’t rely on the “proximity” of other records because the way SQL databases store records is not in a consecutive structure like that at all behind the scenes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table in SQL Server which looks like this: ID Code Name
I have a table similar to this: CREATE TABLE example ( id integer primary
Has anyone done this / have some example code?
I have this long code about a table width some various content. It is
I have a table like the following table: UserID Num1 Num2 Code Name Cat
For this (pseudo code) example I have two tables in MySQL: member { id,
I have a database table like this Port Code | Country |Port_Name -------------------------------------- 1234
Say we have a table like this: **tablename** ID Name Size Date AtStore1 AtStore2
For example i have this xml. I need to get value of parameter val
OK. For example I have this line in my txt file: 1|1,12;7,19;6,4;8,19;2,2 As you

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.