Hi there!

You need to be logged in to view this course.

Creating a Proper Import Script

If we try to run our import script twice we're going to get an error because the schema already exists - as does our table. We could check to see if these things exist first, but it's much easier just to hose everything and rerun.

To do that, we need to drop everything first. We can also avoid errors by ensuring the drop only happens if the schema exists first:

drop schema if exists csvs cascade;

That cascade keyword will drop the target object and all dependent objects on it.