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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:13:59+00:00 2026-06-17T18:13:59+00:00

How do I retrieve the data on all columns from an INNER JOIN result?

  • 0

How do I retrieve the data on all columns from an INNER JOIN result? I use this query:

SELECT course.course_title, 
       course.course_body, 
       course. course_image, 
       instructor.instructor_title, 
       instructor.instructor_body, 
       instructor.instructor_photo
FROM  course
INNER JOIN instructor
ON  course.course_instructor1=instructor.instructor_nid
WHERE course_id=4

and this is the equivalent variable COURSE_OUTLINE that i’ll be using to execute

String COURSE_OUTLINE = 
        "SELECT " + Qualified.COURSE_TITLE + ", " 
                  + Qualified.COURSE_BODY + ", " 
                  + Qualified.COURSE_IMAGE + ", "
                  + Qualified.INSTRUCTOR_TITLE + ", "
                  + Qualified.INSTRUCTOR_BODY + ", "
                  + Qualified.INSTRUCTOR_IMAGE + ", " +
        "FROM "   + Tables.COURSE_JOIN_INSTRUCTOR +
        "WHERE "  + CourseColumns.COURSE_ID + 
        "=?";

In my code,

Cursor cur = mSqliteDb.rawQuery(SubQuery.COURSE_OUTLINE, new String[] {position});

This gives 1 record. I know how to retrieve data from a specific column but I’m not sure how to retrieve it from all columns.

this is the code I use to retrieve data from a specific column

public String getCourseImage(int position) {
    String image = "";
    String pos = Integer.toString(position);

    Cursor cur = mSqliteDb.rawQuery(SelectQuery.ALL_COURSES, new String[] {pos});
    if (cur != null) {
        if (cur.moveToFirst()) {
            do {
                image = cur.getString(cur.getColumnIndex(CourseColumns.COURSE_IMAGE)); 
            } while (cur.moveToNext());
        }
        cur.close();
    }
    return image;
}

My intention is mapping each data in a column to a View

  • 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-17T18:14:00+00:00Added an answer on June 17, 2026 at 6:14 pm

    getColumnNames gives you an array with all columns… if that’s what you’re asking. It’s kind of hard to tell.

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

Sidebar

Related Questions

I retrieve data from db like that: select * from MOVIE_COMMENT where USER_ID =
i wan to retrieve data from query involving many tables. i have a query
I am trying to select all (*) the data columns on one table accompanied
I want to store and retrieve data that is accessible to all activities in
When using hibernate to retrieve data from Oracle 11g DB using either org.hibernate.dialect.Oracle10gDialect or
I’m trying to retrieve data from an entity and populate a viewModel property like
How to retrieve data from sqlite database? Getting return value zero. -(id)init{ if(self==[super init]){
I am trying to retrieve data into an xml tag from the database using
I'd like to retrieve data from a specific webpage by using urllib library. The
I am using Zend_Db_Select currently to retrieve hierarchical data from several joined tables. I

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.