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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:25:16+00:00 2026-05-23T11:25:16+00:00

I have 2 tables as below: select 1 as id, ‘A’ as place into

  • 0

I have 2 tables as below:


select 1 as id,
'A' as place 
into #places
UNION
select 2 as id,
'B' as place 
UNION
select 3 as id,
'C' as place
UNION
select 4 as id,
'D' as place

select 'x' as name,
2 as start,
3 as endd 
into #travel
UNION
select 'y' as name,
4 as start,
1 as endd
UNION
select 'z' as name,
1 as start,
3 as endd

select * from #places
select * from #travel

——————————

Now I want to get name/start place/end place using joins?

  • 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-23T11:25:17+00:00Added an answer on May 23, 2026 at 11:25 am
    select #travel.*, pstart.place as start, pend.place as end
    from #travel inner join #places as pstart on pstart.id = #travel.start
    inner join #places as pend on pend.id = #travel.end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have 2 tables as below, and insert data into ftable from f_table accordingly.
I have two tables like below, mysql> select * from Books ; +----+------+------------+----------+----------+ |
I have the following tables below: Monster: Name Description EatsPeople Vampire Pale, afraid of
Using Microsoft SQL 2008. I have two tables that I want to select from
I have two tables as below: Invoice InvId | Amount | Name ----------------------- 1
I have 2 tables as below and want to have select both of them
Say I have two tables as outlined below: mysql> show columns from ping; +------------+------------------+------+-----+---------+----------------+
I have a very large query that follows the format below: select ... from
i have three tables, i want to select all data from one of the
I have 4 tables: ARTICOLE BAR BUCATARIE MAGAZIE mysql> select * from ARTICOLE; |

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.