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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:50:56+00:00 2026-06-11T01:50:56+00:00

I need to do the following : select table1.abc from table1 where col1 =

  • 0

I need to do the following :

select table1.abc from table1 where col1 = ? and col2 = ?

The problem here is i need to get data from this table for 3 sets of (col1, col2).
I don’t want to execute the same query 3 for different parameters.

Also i want to have the result set of the executed query containing 3 columns of data (1 for each set of col1,col2).

Let me know if any further details are reqd.

  • 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-11T01:50:58+00:00Added an answer on June 11, 2026 at 1:50 am

    You can just use subselects if there’s only one result for your query:

    select (select table1.abc from table1 where col1 = ? and col2 = ?),
        (select table1.abc from table1 where col1 = ? and col2 = ?),
        (select table1.abc from table1 where col1 = ? and col2 = ?)
    from table1
    limit 1
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have the following query SELECT table1.col1, table2.col2 FROM table1 INNER JOIN table2
I need to do the following: Select Usernames from table delivery where date>2012-06-01 00:00:00
I'm facing the following problem: in the controller I select the data I need
I need to implement the following query in SQL Server: select * from table1
I need help with the following query. create table #table1 (id int not null
Look at the following string : SELECT column1 , column2, column3 FROM table1 WHERE
I'm using the following to get data from database in a php file: $query_pedVR
consider the following example. I have to select all the records from table1 which
Given a table ABC with columns Col1, Col2 and Col3 it is possible to
I have following query select * from table1 if table1 contains text type column/columns

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.