Experts explain this sql statement!

Category: Java EE
2008-11-12 06:41:12

Sponsored Links
String sql = "select A. *, B.empname, C.gpname from userinfo A, emp B, usergroup C where A.empid = B.empid ; and A.gpid = C.gpid ";
please explain what is! Thank you!

Sponsored Links

2008-11-12 06:54:17
three-table join queries, userinfo individual names from A all of the following fields, emp alias (B) under the table empname field, usergroup Alias ​​Table C under gpname field, the query condition is that there are three fields in the table
2008-11-12 07:00:44
three-table join query
is from the table a, b, c in the condition detected (Table) A.empid = (Table) B.empid and (table) A.gpid = (table) C.gpid items A. *, B . empname, C.gpname
2008-11-12 07:08:27
2008-11-12 07:25:39
This is a simple multi-table join queries.
the following meanings:
connecting three tables: userinfo table another named A, select all the fields in Table A; emp table another named B, Option B Table empname field; usergroup another table named C, Table C gpname selected fields.
three-table join condition is:
A.empid = B.empid and A.gpid = C.gpid.

Domain and server ip had changed since 8/23/2013. Suspend the user registration and posts for program maintenance.