我正在使用PostgreSQL,并且有两个如下表:
mesh.geometry.boundingSphere.center.set( x, y, z );
mesh.geometry.boundingSphere.radius = radius;
现在在我的代码中,我有一个特殊的mail_number,我想找到包含我的mail_number的行! 我想要类似的东西:
table1:
id title content mail_number
table2:
id title mail_date mail_number
答案 0 :(得分:3)
好吧,您可以执行以下操作:
select id, title, content, NULL as mail_date, mail_number
from table1
where mail_number = <my_number>
union all
select id, title, NULL as content, mail_date, mail_number
from table1
where mail_number = <my_number>;