Created
September 28, 2020 22:18
-
-
Save firemonk9/ae04688b47e66610562d06efbb1ffe48 to your computer and use it in GitHub Desktop.
generate data with sequence
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE dataq_demo.tbl_ItemTransactions1 | |
( | |
TranID SERIAL | |
,TransactionDate TIMESTAMPTZ | |
,TransactionName TEXT | |
); | |
drop table dataq_demo.tbl_ItemTransactions1 | |
INSERT INTO dataq_demo.tbl_ItemTransactions1 | |
(TransactionDate, TransactionName) | |
SELECT x, 'dbrnd' | |
FROM generate_series('1600-01-01 00:00:00'::timestamptz, '2018-02-01 00:00:00'::timestamptz,'1 minute'::interval) a(x); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment