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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T00:10:20+00:00 2026-06-17T00:10:20+00:00

(SQLite and C#) I have this little problem. See those 2 tables. 1. is

  • 0

(SQLite and C#)
I have this little problem. See those 2 tables. 1. is parent, 2. is child

Parent

Child

I should get “broj_goluba” from parent table to match “par_m” and “par_z” in child table and later just display it in datagridview.

Foregin keys should help to get things done fast, but here when I write code I have much more lines of code opposed to not using foreign keys.

Could someone please help me and write down how my code (EDIT: SQL query) should look like when using foreign keys.

  • 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-17T00:10:21+00:00Added an answer on June 17, 2026 at 12:10 am

    What I understand you need is that, but it doesn’t have to do anything with speed. Maybe you mean INDEX and not FOREIGN KEY.

    SELECT BROJ_GOLUBA
    FROM TABLE1
    INNER JOIN TABLE2 ON (TABLE1.ID = TABLE2.PAR_M OR TABLE1.ID = TABLE2.PAR_J)
    

    Or maybe you need BOTH values to be equal:

    SELECT BROJ_GOLUBA
    FROM TABLE1
    INNER JOIN TABLE2 ON (TABLE1.ID = TABLE2.PAR_M AND TABLE1.ID = TABLE2.PAR_J)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In this example we have 3 related tables on a SQLite database: CREATE TABLE
I have a little problem with getting all data from SQLite database and showing
So this is what I have, I have a SQLite database with 3 tables:
My application has multiple SQLite tables(around 20 with different fields). This I have created
I have a table looking like this created with sqlite. CREATE TABLE Cars (
I have a little problem with a php page that display an sqlite database
I have a basic QTableView displaying data from an SQLite table with QSqlTableModel. Data
I have a little problem with getting the elements in my sqlite database in
I have a little problem with inserting data in sqlite in Android. I wrote
I'm making a little wrapper class for sqlite. To get data to/from the database

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.