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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:07:42+00:00 2026-06-12T18:07:42+00:00

Table a: field1 field2 x1 x1 Table b: field 1 x1 How would I

  • 0

Table a:

field1 field2
x1     x1

Table b:

field 1
x1

How would I select on table b where field1 = to field 1 of table a?

What if the name of table b is field1 of table a, what is the syntax to perform the join as the selected table being a.field1

This is the actual query I am using:

mysql_query("SELECT * FROM tags WHERE id3='$value' AND flag!='w' AND visibility='t' JOIN tags.albumid WHERE photoid=tags.photoid AND visibility!='d' ORDER BY datetimep DESC LIMIT 200");
  • 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-12T18:07:43+00:00Added an answer on June 12, 2026 at 6:07 pm

    Depending on how complex your task is, you can either simply connect rows that have the same value:

    Select * from a, b where a.field1 = b.field2
    

    or use joins:

    select a.* 
    from Tableb b
    join Tablea a
    on a.field1=b.field1
    

    In the first case you might have to filter again using the Distinct key word if you want to avoid multiple rows containing the same data

    As for joins, there are different types. See eggyal’s link.

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

Sidebar

Related Questions

$query = SELECT field1, field2 FROM table WHERE id IN (1, 2, 3, 4,
I have a select like this: SELECT field1, field2, field3 FROM table WHERE field1=
I would like to run something like: select * from table where field in
I would like to do the following: SELECT sum(max(field-10,000,0)) from TABLE as in, I
One would normally have this query in their sphinx.conf file : sql_query = SELECT
I have been struggling with the following query: select * from table_name where contains((field1,field2),'S.E.N.S');
table field1 field2 a 1 b c 3 e 4 f I need to
I have a table like below: Table A ---------- ID Field1 Field2 Field3 1
I'm trying to do an Insert operation using iBatis. INSERT INTO SCHEMA.TABLE (FIELD1, FIELD2,
For example, I have a table TableA, with columns Field1, Field2 and Field3. My

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.