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?
ALT + F1 (Select any stored procedure on query editor and press ALT + F1) : It runs the sp_help system stored procedure. CTRL + 1: In the same way, it runs the sp_who system stored procedure. It will provide you the details like who created the SP, spid, host name, on which DB the SP was created and so on.
Execute (F9) only executes the statement you have selected. Execute as script (F5) executes every statement in the editor in order.
You want the in
operator:
SELECT n.*
FROM nobel n
WHERE n.winner IN ('Theodore Roosevelt', 'Woodrow Wilson', 'Jed Bartlet', 'Jimmy Carter');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With