用的db2数据库 现在想要在一个表里面取出每一天的前一千条数据 这个select语句怎么写啊
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了用的db2数据库 现在想要在一个表里面取出每一天的前一千条数据 这个select语句怎么写啊相关的知识,希望对你有一定的参考价值。
参考技术A 1、创建结果表create
table
new_table_name
as
(select
*
from
table_name)
definition
only;
2、创建物化查询表(mqt)
create
table
new_table_name
as
(select
*
from
table_name)
data
initially
deferred
refresh
deferred;
refresh
table
new_table_name;
注意:物化表select语句类似一个查询,没有真正形成表,类型显示为query。但它完全可以当表来用。
3、复制表结构
create
table
new_table_name
like
table_name;
以上是关于用的db2数据库 现在想要在一个表里面取出每一天的前一千条数据 这个select语句怎么写啊的主要内容,如果未能解决你的问题,请参考以下文章