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

  • Home
  • SEARCH
  • 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 8225725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T15:30:42+00:00 2026-06-07T15:30:42+00:00

I have 2 table1 and table2 table1 id,desc table2 id,t1_id,desc how i can select

  • 0

I have 2 table1 and table2

table1
id,desc

table2
id,t1_id,desc

how i can select row depending on desc=”something”

select * from table1 t1 
left join table2 t2 on t1.id=t2.t1_id 
where t1.desc='something'

there is data in table 1 having desc “something” but its returning nothing

i tried

where "desc"='something'

but giving

ambiguous column desc error.

how i can retrieve data from table 1 where desc=’something’ in postgreSQL

many thanks…

  • 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-07T15:30:43+00:00Added an answer on June 7, 2026 at 3:30 pm

    Use " to escape reserved keywords.

    select * from table1 t1 
    left join table2 t2 on t1.id=t2.t1_id 
    where t1."desc"='something'
    

    But don’t forget to add the table name or alias if a column is named equal in 2 tables. The DB engine does not know which one to take if you don’t specify the table.

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

Sidebar

Related Questions

I have Table1 and Table2 related on Table1.ID. There can be zero or more
SELECT ID ( Select ID from Table1 where Table1.ID=@ID )T1 Left Outer join (
I have a mysql statement: SELECT userid,username FROM table1 ORDER BY userid DESC LIMIT
select top 1 col1 from table1 order by CreatedOn desc This query takes 6
I have this query: select distinct id,name from table1 For a given ID, the
I have two tables: This is table1: product_id|product_desc|product_name|product_s_desc This is table2: product_price_id|product_id|product_price Now I
So lets say I have TABLE1 and TABLE2. CREATE TABLE TABLE1 ( first_id int
I have two tables - table1 and table2 table1 has 14 columns and table2
I have two tables table1 and table2 each having a column named email along
I have a query that picks out a specific row/column from a large 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.