我有下面的T-SQL查詢從一系列表中刪除一條記錄:SQL錯誤 - 語法錯誤
DELETE FROM config INNER JOIN config_profile ON config.config_id = config_profile.config_id
INNER JOIN config_page ON config_profile.config_profile_id = config_page.config_profile_id
INNER JOIN config_field ON config_page.config_page_id = config_field.config_page_id
INNER JOIN config_constraint ON config_field.config_field_id = config_constraint.config_field_id
INNER JOIN config_constraint_type ON config_constraint.config_constraint_type_id = config_constraint_type.config_constraint_type_id
WHERE config.config_name = 'ConfigName' AND config_profile.profile_name = 'ProfileName'
但它不斷拋出的錯誤:
Msg 156, Level 15, State 1, Line 1
Incorrect syntax near the keyword 'INNER'.
看着它,我不確定我錯過了什麼。任何幫助表示讚賞。
您可以省略第一個FROM如果它使對眼睛:) DELETE FROM配置配置INNER JOIN ... – Tony 2010-12-13 16:43:50
@Tony感謝我更容易我更新了我的答案 – 2010-12-13 16:48:52