请教几个SQL7数据类型的问题?

xfile 2000-08-19 10:39:00
SQL7中:
1.timestamp 数据类型有何作用?
是否当插入和更新记录时,该字段自动加入当前时间?

2.varhar 与 nvarhar 有何区别?
nvarhar为unicode.两者应分别在何时使用?
varhar 允许的最大长度是255吗,为什麽我设成300,Enteprise Manage 也没有报错?

3.另外:Oracle8与8i有何关系?
是否8i是8的一个子集,但加入了internet?

...全文
96 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
w102272 2000-08-19
  • 打赏
  • 举报
回复
varchar最大长度是8000,不定长,nvarchar支持uucode,timestamp是时间戳
nvarchar(n)
variable-length unicode character data of n characters, n must be a value
from 1 through 4000. storage size, in bytes, is two times the number of
characters entered. the data entered can be 0 characters in length. the sql-92
synonyms for nvarchar are national char varying and national character
varying.
timestamp: A database-wide unique number, the storage size is 8 bytes.
a table can have only one timestamp column. the value in the timestamp column
is updated every time a row containing a timestamp column is inserted or
updated. This property makes a timestamp column a poor candidate for keys,
especially primary keys, any update made to the row changes the timestamp
value,thereby changing the key value, if the column is in a primary key,
the old key value is no longer valid, and foreign keys referencing the old
value are no longer valid. if the table is referenced in a dynamic cursor,
all updates change the position of the rows in the cursor, if the column is
in an index key, all updates to the data row also generate updates of the
index.
the value of a timestamp column is unique within a database.
a nonnullable timestamp column is semantically equivalent to a binary(8)
column, a nullable timestamp column is semantically equvalent to a varbinary(8) column.

34,587

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
  • 基础类社区
  • 二月十六
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧