Creating a table in SQL Server

The historical version of this page showed SQL Server Enterprise Manager. That interface is obsolete, but the underlying task—creating a table—is still fundamental. Current SQL Server installations are commonly administered with SQL Server Management Studio (SSMS), Azure Data Studio replacements/tooling, or SQL scripts.

Create the table with T-SQL

CREATE TABLE dbo.student (
  id INT IDENTITY(1,1) NOT NULL CONSTRAINT PK_student PRIMARY KEY,
  name VARCHAR(50) NOT NULL,
  class VARCHAR(20) NOT NULL,
  mark INT NOT NULL,
  sex VARCHAR(20) NULL
);

An IDENTITY column can generate numeric keys, while the primary-key constraint enforces uniqueness. Choose column lengths and nullability from the real data requirements rather than copying old sample widths.

Historical screenshot

The screenshot below is retained only to document the older Enterprise Manager workflow. Do not expect the current SQL Server management interface to match it.

Historical SQL Server Enterprise Manager create table screen
ASP Home






✖
We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles Contact us
© 2000-2026 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer