In SQL, we can use the CREATE TABLE IF NOT EXISTS
statement to create a table only if it doesn’t exist. The benefit of doing this is that we won’t get an error if there’s already a table with the same name.
But SQL Server doesn’t support this syntax – at least not in the current version of SQL Server at the time of writing (SQL Server 2022) .
So with SQL Server, we need to do a bit of extra work.
Continue reading