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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T17:59:38+00:00 2026-06-05T17:59:38+00:00

I have only a very basic knowledge of SQL, so pls do forgive if

  • 0

I have only a very basic knowledge of SQL, so pls do forgive if this is a stupid Q. I hunted the internet but could not get an answer.

I have three tables:

title

id int <- PK

artist_id int

album_id int

desc varchar

artist

arist_id int <- FK

desc varchar

album

album_id int <- FK

desc varchar


title data

1, 1, 1, “Give me everything”

1, 2, 2, “More”

1, 3, 3, “What makes you beautiful”

artist data

1, “Pitbull”

2, “Usher”

3, “One Direction”

album data

1, “Planet Pit”

2, “More”

3, “Up All Night”

If I want to do a search of one table I do like so:

select * from artist where desc like ‘%direction%’;

My objective is to do a search across three tables. The search SQL query should return rows for “title” table where the search criteria has been met in the “desc” field of any of the three tables using the artist_id and album_id fields (which are the linking keys).

My brain is totally muddled today. If the Q is not clear, pls do ask for clarity.

  • 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-05T17:59:40+00:00Added an answer on June 5, 2026 at 5:59 pm

    You need to make a inner join between tables like this:

    select t.* from title t
    inner join artist ar on ar.artist_id = t.artist_id
    inner join album al on al.album_id = t.album_id
    where (t.desc like '%direction%' or ar.desc like '%direction%' or al.desc like '%direction%')
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have very little programming knowledge; only a fair bit in Visual Basic. How
I only have very basic knowledge on Javascript and I want to be able
I realize that this is probably a very basic question, but I have spent
I have only this, but my compiler says:Type mismatch: cannot convert from ArrayList to
My limited SQL knowledge prompted this post! I have a stored procedure that runs
I have only one table in my mySql database for a very basic website
I have a very basic understanding of shell scripting, but what I need to
I know this is a very basic concept in Django, and I have tried
I have a very basic question about SQL server and Visual Studio 2010. I'm
I only have some very rudimentary theoretical knowledge about RSA. While reading different sources

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.