I have a sql tab with this structure
CREATE TABLE #ARCHPRES(PRESID INT, IDEMITT INT)
In this sql table is stored a configuration like below
INSERT INTO #ARCHPRES VALUES
(1,22),
(1,32),
(1,42),
(1,223),
(1,250),
(2,54),
(2,57),
(2,223),
(2,250),
(3,171),
(3,223),
(3,250),
(4,182),
(4,185),
(4,188),
(4,191),
(4,223),
(4,250),
(5,171),
(5,223),
(5,250),
(6,182),
(6,185),
(6,188),
(6,191),
(6,223),
(6,250)
I would like to extract from this sql table only common values among each and all (presid) archives
In short, my end result should return be 223 and 250, how can i do that?
Sorry for my english as it's not my native language.