I have created manually a database called SnapshotsDb
in Azure Sql Server via SSMS.
Trying to get the ID of the SnapshotsDb
using DB_ID()
function:
DECLARE @db_id int;
SET @db_id = DB_ID(N'SnapshotsDb')
PRINT @db_id
Not output
If I try same logic on a local instance of sql server, it does return an int which matches the ID of the database.