如何创建一个包含列的表来存储多行文本

时间:2012-11-16 11:11:36

标签: sql sql-server

我是sql的新手。我需要创建一个表来保存员工详细信息“员工ID,姓名,出生日期,地址和电话”。

创建此类表的查询是什么。地址字段应为多行文字

提前致谢

1 个答案:

答案 0 :(得分:0)

CREATE TABLE [dbo].[employee](
    [id] [int] IDENTITY(1,1) NOT NULL,
    [name] [varchar](255) NOT NULL,
    [birth_date] [datetime2](7) NOT NULL,
    [phone] [varchar](17) NOT NULL,
    [address] [text] NOT NULL,
 CONSTRAINT [PK_employee] PRIMARY KEY CLUSTERED 
(
    [id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]