‎2007 Dec 26 4:05 PM
can an one tell me exact syntax for inner join and where do v use it????
‎2007 Dec 26 4:12 PM
Hi janani
Specifying Two or More Database Tables as an Inner Join
In a relational database, you normally need to read data simultaneously from more than one database table into an application program. You can read from more than one table in a single SELECT statement, such that the data in the tables all has to meet the same conditions, using the following join expression:
SELECT...
...
FROM <tab> [INNER] JOIN <dbtab> [AS <alias>] ON <cond> <options>
...
where <dbtab> is a single database table and <tab> is either a table or another join expression. The database tables can be specified statically or dynamically as described above. You may also use aliases. You can enclose each join expression in parentheses. The INNER addition is optional.
A join expression links each line of <tab> with the lines in <dbtab> that meet the condition <cond>. This means that there is always one or more lines from the right-hand table that is linked to each line from the left-hand table by the join. If <dbtab> does not contain any lines that meet the condition <cond>, the line from <tab> is not included in the selection.
plzz reward if usefull
‎2007 Dec 26 4:12 PM
Hi janani
Specifying Two or More Database Tables as an Inner Join
In a relational database, you normally need to read data simultaneously from more than one database table into an application program. You can read from more than one table in a single SELECT statement, such that the data in the tables all has to meet the same conditions, using the following join expression:
SELECT...
...
FROM <tab> [INNER] JOIN <dbtab> [AS <alias>] ON <cond> <options>
...
where <dbtab> is a single database table and <tab> is either a table or another join expression. The database tables can be specified statically or dynamically as described above. You may also use aliases. You can enclose each join expression in parentheses. The INNER addition is optional.
A join expression links each line of <tab> with the lines in <dbtab> that meet the condition <cond>. This means that there is always one or more lines from the right-hand table that is linked to each line from the left-hand table by the join. If <dbtab> does not contain any lines that meet the condition <cond>, the line from <tab> is not included in the selection.
plzz reward if usefull
‎2007 Dec 26 4:12 PM
select af1 af2 b~f3
from vbak as a
join vbap as b
on avbeln = bvbeln
into table itab
where vbeln in so_vbeln.
inner join is mostly used to get the header and Item level data into a table.