在同一個內部查詢運行多次的情況下,如何定製以下SQL以提高性能?在此先感謝提高性能SQL
DELETE FROM interactionrel
WHERE (from_interact_id IN(SELECT interaction_id
FROM interaction
WHERE instance_pk = ?))
OR (to_interact_id IN(SELECT interaction_id
FROM interaction
WHERE instance_pk = ?))
該聲明是無效的語法('這裏(從.. '),並請正確格式化。 – 2013-03-15 11:10:58
它是SQL Server的 – DevelopmentIsMyPassion 2013-03-15 11:11:25
語法是正確的只有我會正確格式化。 DELETE FROM INTERACTIONREL WHERE (FROM_INTERACT_ID IN (SELECT INTERACTION_ID FROM互動的情況INSTANCE_PK =?)) OR (TO_INTERACT_ID IN (SELECT INTERACTION_ID FROM互動的情況INSTANCE_PK =?)) – user1582625 2013-03-15 11:14:15