```
select version();
```
| version |
|:--------|
| PostgreSQL 16.0 (Debian 16.0-1.pgdg120+1) on x86\_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit |
> ``` status
> SELECT 1
> ```
```
CREATE TABLE public.treadings03 (
rid integer,
d01 double precision,
dtn timestamp without time zone
);
```
> ``` status
> CREATE TABLE
> ```
```
INSERT INTO public.treadings03 VALUES (1, 0.355, '2024-07-08 15:18:53.689');
INSERT INTO public.treadings03 VALUES (2, 0.019, '2024-07-08 15:18:53.693');
INSERT INTO public.treadings03 VALUES (3, 0.726, '2024-07-08 15:18:53.697');
INSERT INTO public.treadings03 VALUES (4, 0.488, '2024-07-08 15:18:53.701');
INSERT INTO public.treadings03 VALUES (5, 0.213, '2024-07-08 15:18:53.705');
```
> ``` status
> INSERT 0 1
> ```
> ``` status
> INSERT 0 1
> ```
> ``` status
> INSERT 0 1
> ```
> ``` status
> INSERT 0 1
> ```
> ``` status
> INSERT 0 1
> ```
```
select * from public.treadings03
```
| rid | d01 | dtn |
|----:|:----|:----|
| 1 | 0.355 | 2024-07-08 15:18:53.689 |
| 2 | 0.019 | 2024-07-08 15:18:53.693 |
| 3 | 0.726 | 2024-07-08 15:18:53.697 |
| 4 | 0.488 | 2024-07-08 15:18:53.701 |
| 5 | 0.213 | 2024-07-08 15:18:53.705 |
> ``` status
> SELECT 5
> ```
```
CREATE UNLOGGED SEQUENCE IF NOT EXISTS public.seq03
CYCLE
INCREMENT 1
START 1
MINVALUE 1
MAXVALUE 5
CACHE 1;
```
> ``` status
> CREATE SEQUENCE
> ```
```
UPDATE treadings03 SET D01=0.001, DTN=now() WHERE treadings03.RID=(select (nextval('seq03')))
```
> ``` status
> UPDATE 1
> ```
```
select * from public.treadings03
```
| rid | d01 | dtn |
|----:|:----|:----|
| 2 | 0.019 | 2024-07-08 15:18:53.693 |
| 3 | 0.726 | 2024-07-08 15:18:53.697 |
| 4 | 0.488 | 2024-07-08 15:18:53.701 |
| 5 | 0.213 | 2024-07-08 15:18:53.705 |
| 1 | 0.001 | 2024-07-10 09:33:05.995822 |
> ``` status
> SELECT 5
> ```
```
UPDATE treadings03 SET D01=0.002, DTN=now() WHERE treadings03.RID=(select (nextval('seq03')))
```
> ``` status
> UPDATE 1
> ```
```
select * from public.treadings03
```
| rid | d01 | dtn |
|----:|:----|:----|
| 3 | 0.726 | 2024-07-08 15:18:53.697 |
| 4 | 0.488 | 2024-07-08 15:18:53.701 |
| 5 | 0.213 | 2024-07-08 15:18:53.705 |
| 1 | 0.001 | 2024-07-10 09:33:05.995822 |
| 2 | 0.002 | 2024-07-10 09:33:06.003428 |
> ``` status
> SELECT 5
> ```