While creating Windows Azura SQL database, this script will be available to you.
The script shown below is supposed to prevent possible collisions that occurs when two tables have exactly the same name.
My question is: Can anyone explain in details how this code works Note: I have a good background of Databases and using of SQL
IF NOT EXISTS (SELECT * FROM sys.objects
WHERE object_id = OBJECT_ID(N'[dbo].[Department]')
AND type in (N'U'))