char(size)
Holds a fixed length string (can contain letters, numbers, and special characters). The fixed size is specified in parenthesis.
varchar(size)
Holds a variable length string (can contain letters, numbers, and special characters). The maximum size is specified in parenthesis.
date(yyyymmdd)
Holds a date
用途:
在已经存在的表中增加后者移除字段
语法:
ALTER TABLE table_name
ADD column_name datatype
DROP COLUMN column_name
注意:某些数据库管理系统不允许移除表中的字段
例:
“Person”表中的原始数据:
LastName
FirstName
Address
Pettersen
Kari
Storgt 20
在Person表中增加一个名为City的字段:
ALTER TABLE Person ADD City varchar(30)
增加后表中数据如下:
<< 上一页 [21] [22] [23] [24] [25] [26] [27] 下一页
Copyright @ 2007-2012 敏韬网(敏而好学,文韬武略--MinTao.Net)(学习笔记) Inc All Rights Reserved. 闵涛 E_mail:admin@mintao.net(欢迎提供学习资源)
鄂公网安备 42011102001154号
站长:MinTao ICP备案号:鄂ICP备11006601号-18