Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
比如说,我运行以下语句来创建一个新的 SQL Server 数据库:
CREATE DATABASE [testdb1] COLLATE SQL_Latin1_General_CP1_CI_AS;
我如何获得它的ID?
SELECT database_id FROM sys.databases WHERE name = N'testdb1';
select DB_ID (N'testdb1')
资源