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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T20:07:53+00:00 2026-05-17T20:07:53+00:00

Given a table of Name Age Bob 30 Paul 35 John 35 and a

  • 0

Given a table of

Name   Age
Bob    30
Paul   35
John   35

and a statement

select * from table ORDER BY Age DESC

What is the ordering of the resulting table?

Name   Age
Paul   35
John   35
Bob    30

or

Name   Age
John   35
Paul   35
Bob    30

or undefined behaviour?

  • 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-17T20:07:54+00:00Added an answer on May 17, 2026 at 8:07 pm

    It’s guaranteed that Bob will be the last row of the resultset. The relative ordering of the other rows isn’t guaranteed in any way.

    If you need guaranteed ordering then you need to be explicit about it. For example:

    SELECT *
    FROM table
    ORDER BY age DESC,
             name ASC
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say I have SELECT name FROM table which gives me something like foo
Given table USER (name, city, age), what's the best way to get the user
Given the table snippet: id | name | age I am trying to form
Finding Duplicate Row with Count Numbers Suppose a table is given ID Name Age
Given the following table on sheet one: Name ------- Alan Barb Corey Barb Alan
Lets say I have an Areas Table ( id, parentId, name, path ). Given
Given two tables APPLE and ORANGE, NAME APPLES Alice 5 Bob 10 Trudy 1
i have an employee table with fields like id, name, age and salary. Iam
I have a table of 100,000s of USERS (name, age, gender, phone, company, street,
I have an sqlite database table similar to the one given below Name |

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.