Time:09-24
CodePudding user response:
, ali code specification: more than three table join is forbidden, could you tell me how to solve need more table association,
IF OBJECT_ID (' tempdb for.. #) IS NOT NULL DROP TABLE # TMP TMP 'The SELECT t.n ame AS tableName, C.n ame AS colName, P.n ame AS typeName, T. object_id AS table_objId, Arthur c. olumn_id INTO # TMP The FROM sys. Tables AS t INNER JOIN sys. [columns] AS c ON [object_id]=t. c. [object_id] INNER JOIN sys. Types AS p ON c.s. ystem_type_id=p. ystem_type_id SELECT * FROM # TMP AS t LEFT JOIN sys. Extended_properties AS ep ON t.t able_objId=ep. Major_id AND tc olumn_id=ep. Minor_id IF OBJECT_ID('tempdb.. #) IS NOT NULL DROP TABLE # TMP TMP '
join the join a join b c d ==& gt; (a join b) join the join d (c) This is a few times?
Quote: 11 references to hit dead Newton's apple's reply: Join a join b c join d ==& gt; (a join b) join the join d (c) This is a few times? you like a silly force
Join a join b c join d ==& gt; (a join b) join the join d (c) This is a few times?
maybe several times is to query, For example, from the name to find the name of the department, start with the personnel in the table, by name to check the department ID; Check the department table, through the department ID to check the department name,
Page link:https//www.codepudding.com/database/27952.html