mssql如何create字段呢?
create db 是新建数据库
create table 是新建表
那新建字段呢? 谢谢。
自己到sqlserver文档中查找create的语法示例吧
SQL code:
下例显示 pubs 数据库中所创建的三个表(jobs、employee 和 publishers)的完整表定义,其中包含所有的约束定义。
/* ************************** jobs table ************************** */
CREATE TABLE jobs
(
job_id smallint
IDENTITY(1,1)
PRIMARY KEY CLUSTERED,
job_desc varchar(50) NOT NULL
DEFAULT 'New Position - title not formalized yet',
min_lvl tinyint NOT NULL
CHECK (min_lvl >= 10),
max_lvl tinyint NOT NULL
CHECK (max_lvl <= 250)
)
/* ************************* employee table ************************* */
CREATE TABLE employee
(
emp_id empid
CONSTRAINT PK_emp_id PRIMARY KEY NONCLUSTERED
CONSTRAINT CK_emp_id CHECK (emp_id LIKE
'[A-Z][A-Z][A-Z][1-9][0-9][0-9][0-9][0-9][FM]' or
emp_id LIKE '[A-Z]-[A-Z][1-9][0-9][0-9][0-9][0-9][FM]'),
/* Each employee ID consists of three characters that
represent the employee's initials, followed by a five
digit number ranging from 10000 through 99999 and then the
employee's gender (M or F). A (hyphen) - is acceptable
for the middle initial. */
fname varchar(20) NOT NULL,
minit char(1) NULL,
lname varchar(30)
相关问答:
有一个数据库里只有2W条数据不到,却有500M那么大,怎么回事啊?是ACCESS的数据库。后来我把ACCESS导入到MSSQL中,也占用了500M左右的空间,如果压缩数据库呢?请高手指点
压缩数据库?能做到么...
期待高人指点 我 ......
我用("insert into LM_info ([content],[date],[username]) values ('"&content&"',date(),'"&username&"')")
是错误的。
但是我用getdat ......
先Happy New Year!
WIN软件的相关的配置信息原来保存在ACCESS和XML文件里面,但多个用户访问并发老出问题,现在放MSSQL里问题解决了,但我不想用户看到数据表结构和里面的数据,只能用软件操作访问。
请问 ......
用了FCKeditor的编辑器,存入普通文章后,可以更新。当存入word的那种表格格式的文章时候,就出现无法更新的问题。 <httpRuntime maxRequestLength="2097151" executionTimeout="43200"/&g ......