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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T17:24:12+00:00 2026-06-08T17:24:12+00:00

Table Name : x id name id is primary key 1 xxxx 2 yyyy

  • 0

Table Name : x

id name
id is primary key

1   xxxx
2   yyyy

Table name : y
sno primary key
id foreign key
class

1 1 first 
2 1  second

OUTPUT

id 
xxxx first second

I do not want name to repeat for each row

SELECT x.name, y.class from x,y  WHERE x.id = y.id

This query output as xxxx first and xxxx second

  • 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-08T17:24:15+00:00Added an answer on June 8, 2026 at 5:24 pm

    Add in GROUP BY y.id then to avoid duplicate.

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

Sidebar

Related Questions

Suppose you have these tables: Table Name: Salesman Fields: S_ID(Primary Key), Name Table Name:
In my database I have table AnimalDetails containing animalNumber(primary key),name,breed dateofbirth and an image
I have a mysql table structure like that: id int primary key name varchar
Design of SQL Table Users: Columns: ID(Primary Key), Name, Age, Zip. I am displaying
I'll start off by showing the code: create table products ('name' text primary key,
I defined a entity with a uuid primary key: @Entity @Table(name = SITES) public
For example, I have two tables. Name: Customer Primary key: idCustomer AnotherColumn: name Foreign
I have a simple table with 2 columns - name and the primary key,
db.execSQL(CREATE TABLE + NotePad.Notes.TABLE_NAME + ( + NotePad.Notes._ID + INTEGER PRIMARY KEY, + NotePad.Notes.COLUMN_NAME_TITLE
I have three tables A: A.pID primary key, A.Name nvarchar(250) B: B.pID primary key,

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.