RE: 'kin statements DUAL select on diff tbls
From: David Portas (REMOVE_BEFORE_REPLYING_dportas_at_acm.org)
Date: 11/05/04
- Next message: Hugo Kornelis: "Update statement in trigger gets bad execution plan"
- Previous message: DW: "Re: Covering indexes versus column order in Delaney"
- In reply to: Red: "'kin statements DUAL select on diff tbls"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 5 Nov 2004 09:30:03 -0800
It looks like one of the following may be what you intended:
SELECT *
FROM Table1
WHERE EXISTS
(SELECT *
FROM Table2
WHERE Col_B = Table1.Col_A)
SELECT *
FROM Table1
WHERE Col_A IN
(SELECT Col_B
FROM Table2)
-- David Portas SQL Server MVP --
- Next message: Hugo Kornelis: "Update statement in trigger gets bad execution plan"
- Previous message: DW: "Re: Covering indexes versus column order in Delaney"
- In reply to: Red: "'kin statements DUAL select on diff tbls"
- Messages sorted by: [ date ] [ thread ]