database - Include table name in column from select wildcard sql -
is possible include table name in returned column if use wildcard select columns tables?
to explain further. suppose want join 2 tables , both tables have column name “name” , many other columns. want use wildcard select columns , not explicitly specifying each column name in select.
select * tablea a, tableb b a.id = b.id
instead of seeing 2 column same name "name", write sql return 1 column name "a.name" (or tablea.name) , 1 "b.name"(or tableb.name) without explicitly putting column name in select?
i prefer solution mssql other database reference too.
thanks!
you joining 2 tables on id field, see 1 column labeled "id", not two, because asking see records id same in table , table b: share same id.
Comments
Post a Comment