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…
Use
"to escape reserved keywords.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.