1 réponse
- Le plus récent
- Le plus de votes
- La plupart des commentaires
1
I tested below and I see that ordering is properly applied highest to lowest. Can you check if timestamp_column is defined as timestamp not string?
create table test_ts_order
(timestamp_column timestamp);
insert into test_ts_order
select getdate()
--wait few seconds
insert into test_ts_order
select getdate()
--wait few seconds
insert into test_ts_order
select getdate()
select * from test_ts_order order by timestamp_column desc;
- 2022-11-11 21:47:09
- 2022-11-11 21:46:47
- 2022-11-11 21:46:22
select version()
PostgreSQL 8.0.2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3), Redshift 1.0.43331
répondu il y a un an
Contenus pertinents
- demandé il y a un an
- demandé il y a 6 mois
- demandé il y a un an
- AWS OFFICIELA mis à jour il y a 4 mois
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a 2 mois
- AWS OFFICIELA mis à jour il y a un an