Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/postgresql/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sql 从表中选择列,条件在其他表中_Sql_Postgresql - Fatal编程技术网

Sql 从表中选择列,条件在其他表中

Sql 从表中选择列,条件在其他表中,sql,postgresql,Sql,Postgresql,我的第一个表t1有以下列: t_id, c_id, town p_id, year_of_birth, t_id -- < is ref to t_id in 1st table 我的第二个表t2有以下列: t_id, c_id, town p_id, year_of_birth, t_id -- < is ref to t_id in 1st table 这在SQL中如何工作?使用普通内部联接:

我的第一个表t1有以下列:

t_id, c_id, town
p_id, year_of_birth, t_id  -- < is ref to t_id in 1st table
我的第二个表t2有以下列:

t_id, c_id, town
p_id, year_of_birth, t_id  -- < is ref to t_id in 1st table
这在SQL中如何工作?

使用普通内部联接: