msagala msagala - 4 months ago 32
SQL Question

Join 2 Table in postgresql but the other table only will extract its columns

Is there a way in postgres when you

2 Table but you only extract the columns of the first table using '*' symbol which means all of the columns of the first table.


I will answer this one because I solved it by the help of Mr.@Gordon Linoff.

I use the alias of the table and use it in the * symbol.

sample code below:

SELECT a.* FROM table_a as a join table_b as b ON;

This will only extract the data of table_a.