Skip to content

查看当前数据库。

SELECT DB_NAME()
GO
test

(1 rows affected)

查看数据库的表。

EXEC sp_tables @table_type = "'TABLE'";
GO

建表。

CREATE TABLE products (
    id INT IDENTITY PRIMARY KEY,
    name NVARCHAR(100) NOT NULL,
    price MONEY NOT NULL,
    description NVARCHAR(1000) NOT NULL
)
GO

删表。

DROP TABLE test

重新建表。

联系 math@baima.site