Chinaunix首页 | 论坛 | 博客
  • 博客访问: 62600
  • 博文数量: 33
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 345
  • 用 户 组: 普通用户
  • 注册时间: 2014-08-02 08:41
文章分类

全部博文(33)

文章存档

2015年(13)

2014年(20)

我的朋友

分类: 数据库开发技术

2015-04-09 09:48:30

  If creating a table with the same name, then the old table it renamed to XXX$n where "XXX" is the original name and "n" is a version number. You can then access it using this name XXX$n and copy data to the new table with the requested transformation (if the schemas are not the same).
  To see all versions of the table use the statement "select * from Metatable".
  Please refer to the below samples.

点击(此处)折叠或打开

  1. XSQL>create table t (x integer);
  2. XSQL>select * from Metatable;
  3. TableName FieldNo FieldName FieldTypeName FieldType FieldSize AutoGenerated ReferencedTable
  4. ------------------------------------------------------------------------------
  5. t 1 x Int4 6 0 false null
  6. Selected records: 1
  7. XSQL>create table t (x double);
  8. XSQL>select * from Metatable;
  9. TableName FieldNo FieldName FieldTypeName FieldType FieldSize AutoGenerated ReferencedTable
  10. ------------------------------------------------------------------------------
  11. t$1 1 x Int4 6 0 false null
  12. t 1 x Real8 11 0 false null

  13. Selected records: 2
  14. XSQL>create table t (x int(8), s string);
  15. XSQL>select * from Metatable;
  16. TableName FieldNo FieldName FieldTypeName FieldType FieldSize AutoGenerated ReferencedTable
  17. ------------------------------------------------------------------------------
  18. t$1 1 x Int4 6 0 false null
  19. t$2 1 x Real8 11 0 false null
  20. t 1 x Int8 8 0 false null
  21. t 2 s String 14 0 false null

  22. Selected records: 4


阅读(665) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~