Rails - PSQL command line query -
i'm trying make app in rails 4 using psql database.
i've created 3 models project, scope , background.
the relationships between them are:
project has 1 scope scope has 1 background, , belongs project background belongs scope
i can't figure out how read psql documentation. have connected database , want search background based on project id.
my problems are:
i know how run 1 search in psql - select * "backgrounds"; want know how search specific record in background table
i don't have project_id foreign key in background table. have scope_id foreign key. however, want search project's background.
how search in psql, in command line, background, project id = 5?
thank you
Comments
Post a Comment