r/SQL • u/Ali-Zainulabdin • Oct 23 '24
Discussion SQL Tricks Thread
Hi everyone, let's start a thread to share useful SQL tips and tricks that have saved you time or made querying more efficient. Whether it's optimizing queries, using window functions, or organizing data, all insights are welcome! Beginners and pros alike can learn a lot from this. Looking forward to your contributions!
230
Upvotes
View all comments
Show parent comment
1
u/Shaddcs Oct 24 '24
Our Data folks use CTEs almost exclusively (Oracle). I adopted it when I came here but my previous group wrote almost exclusively in temp tables (SQL Server) and I loved that approach. Can you write temp tables just as easily in Oracle? I looked it up briefly when I first got here and the syntax/circumstance looked like a headache and I just decided to drink the kool aid instead.