Reputation: 113
SELECT * FROM nobel
WHERE winner = 'Theodore Roosevelt' or winner = 'Woodrow Wilson' or winner = 'Jed Bartlet' or winner = 'Jimmy Carter';
Is there a way to shorten this? Perhaps a way to use regex?
Upvotes: 11
Views: 373
Reputation: 1269803
You want the in
operator:
SELECT n.*
FROM nobel n
WHERE n.winner IN ('Theodore Roosevelt', 'Woodrow Wilson', 'Jed Bartlet', 'Jimmy Carter');
Upvotes: 25