Hi guys this is hopefully a simple one. I have only taken a simple SQL course and am now trying to apply it to a real postgres database. The immediate difficulty I am having is dealing with things at the schema level (multiple schemas) whereas everything I had learned only dealt with querying between multiple tables in a single schema.
I am trying to go one step more than this questioner and filter by schema, but things are behaving very weirdly to me
This is what I mean. This query returns the result I expect (and is lifted straight from this SO example):
so given my sql training so far I figure I can take the output and further refine it.
select table_name
from (select table_name, table_schema from information_schema.columns where column_name = 'user_id')
where table_schema = "web_app"
doing this gives a very weird error:
why is it treating what is obviously a field as a column?? what is this derived_table1? (presumably its the compounded query?)
in the extremely unlikely case that it is a software issue, i am using Navicat premium 9.1.2 and connecting to amazon redshift.