Questenaتمرینی که نشان می‌دهد بعد چه چیزی را مرور کنید
سؤال 15

In PostgreSQL 18, table ua has columns (id, note) and table ub has columns (id, label). How many columns does SELECT * FROM ua JOIN ub USING (id); produce?

  1. 2
  2. It raises an error because id is ambiguous
  3. 3پاسخ درست
  4. 4

توضیح

USING suppresses the redundant join column, so the output is one id followed by note and label. The ON form SELECT * FROM ua JOIN ub ON ua.id = ub.id; keeps both and produces 4 columns, two of them named id - a difference that matters when a client indexes result columns by name.

ادامهٔ این آزمون

شروع تمرین
سؤال 15: In PostgreSQL 18, table ua has columns (id, note) and table… · SQL: NULL, Joins and Aggregates · Questena