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

  • Home
  • SEARCH
  • 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 6884257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:29:05+00:00 2026-05-27T05:29:05+00:00

I just wondering how to select values from table B according to table A

  • 0

I just wondering how to select values from table B according to table A col values; The idea is quite simple but I have confused a little

code like a

DECLARE @A TABLE
(
id INT NOT NULL,
name VARCHAR(50)

);

INSERT @A SELECT id,name FROM table1 WHERE id>10

DECLARE @B TABLE
(

  address VARCHAR(255),
  city VARCHAR(128)

);

INSERT @b SELECT address,city FROM table2
WHERE id=(SELECT id FROM @A) 
  • 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-27T05:29:06+00:00Added an answer on May 27, 2026 at 5:29 am

    Change “id =” to “id IN”

    WHERE id=(SELECT id FROM @A) 
    

    to

    WHERE id IN (SELECT id FROM @A) 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Just wondering what little scripts/programs people here have written that helps one with his
i was just wondering if anyone knows how to select rows where a specified
I'm just wondering what the syntax is to do a db select in Zend
just wondering is there any way that I can return one value from my
I know this is possible but I'm just wondering if anyone else has done
I'm just wondering why CREATE TABLE employeeinfo( position CHAR(50), salary INT NOT NULL, branch
I have written the below VIEW using a UDF, but am wondering if there
say I have the following simple table table a { id int, pointId int,
just wondering if anyone knows of a truly restful Put/delete implementation asp.net mvc preview
Just wondering if a .NET app can be compiled down to native machine code

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.