For anyone following along in postgreSQL, use TEMP or TEMPORARY to create your temporary tables. Unfortunately, postgreSQL doesn't recognize the # sign in creating temp tables. EX: CREATE TEMP TABLE temp_employee( employeeid INT, jobtitle VARCHAR(100), salary INT );
Thank you, Alex. You give the quickest easy-to-understand tutoring I have received on my DA journey. You explain these things well, and you do not overload the learner with more than they need per time. One helpful thing I do is practice while I watch and play around with it as you teach. I often break something, though, and that helps too.
Hi Alex, You are so sweet and positive. I been through many of your videos and to be honest I feel hope from you. Seeing you gives hope. Thanks for existing. 🙂
Such a great example. I was looking for a solution for something I’m working on at work and this is ‘drop table is exist’ is perfect. Thank you.
Liking the video even before start watching it. That's the faith I have on Alex.
Thanks for the good content created for free, it is very useful. I would like to add a little bit of information, if you use one # sign the temp table would be considered local (you can use it only in your currect query window), if you use double ## sign the table would be global (you can use it in a new query window). As they mentioned before, when you close the session the tables will be gone forever, so you need to create them again. My two cents!
Wow! I love the "DROP TABLE IF EXISTS..." command. Really useful too! Thanks Alex. You're GREAT!
Wow. Never even thought about this. Would make that information super accessible quickly
I'm preparing for a interview, very helpful video. Thank you
Once again a great tutorial!! This is the next concept in the Google data analytics course. Thank you so much you made it smooth digestible.
Great tutorial! This is like querying a query. I’m learning a lot from your videos. Thank you Alex
You can also check the existence of temporary tables using object explorer. In the object explorer, expand TEMPDB database folder, and then exapand TEMPORARY TABLES folder, and you should see the temporary table that we have created.
I just want to say thank you so much for your video's I have learnt more today than I have ever known about SQL and will continue subscribe. You are a HUGE help!!
Ten minutes goes by fast. This was much needed.
I got exactly the information I was looking for and I started following your channel, thanks.
Alex Thanks man! All the way from South Africa
No need to drop #temp table if you close the current session it will automatically delete from the tempdb 😊
Hello Alex, Could you please explain the difference between Temp tables and CTEs. Also, when should you use which one?
Thank you for this video and for all your tutorials. Question: what is the difference between using a temp table to store a part of a table and using a view to store the same logic and the same part of that table?
@kstevens0915