97.0k views
2 votes
Which statement has the correct syntax for performing an inner join?

a. select ID, Name, Salary
from one join two
on ID=IDNO;

b. select ID, Name, Salary
from one join two
where ID=IDNO;

c. select ID, Name, Salary
from one inner join two
on ID=IDNO;

d. select ID, Name, Salary
from one inner join two
where ID=IDNO;

1 Answer

3 votes

Final answer:

The correct syntax for performing an inner join is 'select ID, Name, Salary from one inner join two on ID=IDNO;'. It combines rows from two or more tables based on a related column.

Step-by-step explanation:

The correct syntax for performing an inner join is option c: select ID, Name, Salary from one inner join two on ID=IDNO;

An inner join combines rows from two or more tables based on a related column between them.

The ON keyword is used to specify the join condition, in this case, ID=IDNO. This query will return the ID, Name, and Salary columns from the tables 'one' and 'two' where the ID column value matches the IDNO column value.

User Alan Dyke
by
8.6k points