mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 11:01:52 +01:00
3a64d55aed
* Syntax sugar: query-global QUERY FOR SYSTEM_TIME
22 lines
1,005 B
Text
22 lines
1,005 B
Text
create table t(
|
|
a int,
|
|
b int without system versioning
|
|
) with system versioning;
|
|
|
|
insert into t values(1, 2);
|
|
insert into t values(3, 4);
|
|
select * from t;
|
|
select a from t for system_time as of timestamp now(6);
|
|
select a, b, b+0 from t for system_time as of timestamp now(6);
|
|
select * from t for system_time as of timestamp now(6);
|
|
select count(*) from t group by b query for system_time as of timestamp now(6);
|
|
select * from t for system_time as of timestamp now(6) order by b asc;
|
|
select * from t for system_time as of timestamp now(6) order by b desc;
|
|
select * from t group by a having a=2 query for system_time as of timestamp now(6);
|
|
select * from t group by b having b=2 query for system_time as of timestamp now(6);
|
|
select a from t where b=2 query for system_time as of timestamp now(6);
|
|
select a from t where b=NULL query for system_time as of timestamp now(6);
|
|
select count(*), b from t group by b having b=NULL query for system_time as of timestamp now(6);
|
|
select a, b from t;
|
|
|
|
drop table t;
|