Sybase内置数据类型Timestamp
来源:互联网 发布:淘宝免费购物 编辑:程序博客网 时间:2024/06/07 12:26
1> select @@version2> go -------------------------------------------------------------------------------- Adaptive Server Enterprise/15.5/EBF 18164 SMP ESD#2/P/x86_64/Enterprise Linux/a sear155/2514/64-bit/FBO/Wed Aug 25 11:17:26 2010 (1 row affected)
一张表中只能创建一个Timestamp类型字段:
1> create table test(t1 timestamp, t2 timestamp)2> goMsg 2738, Level 16, State 2:Server 'SYBASE', Line 1:A table can only have one timestamp column. Since table 'test' already has one,you can't add the column 't2'.1> create table test(id int, date date, time timestamp)2> go
Sybase中的Timestamp不是一种时间类型(这点和Oracle、MySQL不一样):
1> insert into test values(1, getdate(), getdate())2> goWarning: A non-null value cannot be inserted into a TIMESTAMP column by theuser. The database timestamp value has been inserted into the TIMESTAMP fieldinstead.(1 row affected)1> select * from test2> go id date time ----------- ------------ ------------------ 1 Jul 24 2014 0x00000000000a8b75 (1 row affected)
Timestamp类型字段是一个顺序号(只增不减),本质上算是一种“戳”,用来记录跟踪数据库中数据页的修改情况(主要被系统使用进行自身维护工作,用户不可以直接修改、处理这种数据类型的数据):
1> update test set date = getdate()2> go(1 row affected)1> select * from test2> go id date time ----------- ------------ ------------------ 1 Jul 24 2014 0x00000000000a8bdb (1 row affected)
插入的时候不指定具体值,或者插入null,数据库都会在不报错的情况下完成该字段的填充:
1> insert into test values(2, getdate(), null)2> go(1 row affected)1> insert into test(id, date) values(3, getdate())2> go(1 row affected)1> select * from test2> go id date time ----------- ------------ ------------------ 1 Jul 24 2014 0x00000000000a8bdb 2 Jul 24 2014 0x00000000000a8bec 3 Jul 24 2014 0x00000000000a8bf5 (3 rows affected)
0 0
- Sybase内置数据类型Timestamp
- timestamp 数据类型
- TIMESTAMP 数据类型
- TIMESTAMP 数据类型
- Sybase数据类型
- 内置数据类型
- TIMESTAMP数据类型-007
- SqlServer的 timestamp数据类型
- Sqlserver:timestamp数据类型
- SQL Server timestamp 数据类型
- DATE和TIMESTAMP数据类型
- mysql中timestamp数据类型
- Mysql数据类型---TIMESTAMP
- sybase的数据类型
- Sybase的数据类型
- oracle的timestamp与sybase的datetime
- sybase之数据类型 + Sybase语法大全
- Oracle 数据类型timestamp和date
- php学习之道:php中is_file和file_exist的区别,and判断目录is_dir
- 完美解决 IOS系统safari5.0 浏览器页面布局iframe滚动条失效问题
- 在HTML中引入CSS的方法
- 关于 Java 基础整理(一)
- android--zxing扫描--Method call after release问题的解决方案
- Sybase内置数据类型Timestamp
- MAC 下 FlashBuilder 4.6 的破解方法
- pl/sql常用判断语句
- 阿达见地方哈工大撒归属地
- jQuery学习总结四 --- 功能性表格的开发
- 大盘指数是什么意思?
- 通用Control类 - 基于Thinkphp写的通用资讯管理类
- QtCreator 使用DOM创建和操作(添加,删除,更新)XML
- web架构