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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T23:08:39+00:00 2026-06-10T23:08:39+00:00

I have a simple and silly doubt in sql. I have to write down

  • 0

I have a simple and silly doubt in sql.
I have to write down a query like the one below.
Here, id is not unique. But when i do the following query i get unique values as output. How do i get multiple values?

select name from students_table where id in (select id from students_id);

Ex : Lets say students_table has name   id
                                 -----  ---
                                 john    1
                                 jack    2

     And students_id table has   id    
                                 ---
                                  1
                                  1
                                  1
                                  2
                                  ...

If i write the query in the above way i get name
                                            ----
                                            john
                                            jack

Instead i want my output as name
                            ----
                            john
                            john
                            john
                            jack
  • 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-06-10T23:08:41+00:00Added an answer on June 10, 2026 at 11:08 pm
    select st.name from students_id si
    join students_table st on st.id = si.id;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This may be a silly question but... Say you have a sentence like: The
I am making a simple iphone application where I have certain textfields one below
I feel a bit silly for asking such a simple question but here goes...
Very simple + silly question: Does clojure provide multi maps? I currently have something
This may seem a very silly question. Consider this: I have a simple Boolean
I think this is a simple and a silly question. I have included a
I have simple database - one table with 6 collumns. 3 of them i
I have to create a simple, one-level menu in an ASP.NET website clicking on
I am having a silly issue with onClickListeners modifying GUI elements. Below I have
I know this might sound silly but I have no idea how to do

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.