hi
sir magkano pagawa ng payroll system using vb,asp.net sql? hirs my number sir 09228590639.
SQL INNER JOIN is almost the same as the normal join. But the INNER JOIN will only list those rows which have at least one matching value from both tables.
SQL INNER JOIN Syntax
Consider the following table for this exercise
Users
Firstname | Lastname | Salary | DeptID |
---|---|---|---|
John | Smith | 1000 | 1 |
Mathew | Simon | 3000 | 1 |
Bill | Steve | 2200 | 1 |
Amanda | Rogers | 1800 | 2 |
Steve | Hills | 2800 | 2 |
Steve | jobs | 2400 | 2 |
bill | cosby | 700 | 3 |
DeptID | DepartmentName |
---|---|
1 | Employee |
2 | Management |
3 | Staff |
Example # 1
Result of the Query
Firstname | Lastname | Salary | DepartmentName |
---|---|---|---|
John | Smith | 1000 | Employee |
Mathew | Simon | 3000 | Employee |
Bill | Steve | 2200 | Employee |
Amanda | Rogers | 1800 | Management |
Steve | Hills | 2800 | Management |
Steve | jobs | 2400 | Management |
bill | cosby | 700 | Staff |
We have joined the two tables and matching the primary keys and the foriegn keys from both tables. But of course the column name is not bound to primary keys and foreign. You could link other column as well.