Skip to content

Instantly share code, notes, and snippets.

@firemonk9
Created September 28, 2020 22:18
Show Gist options
  • Save firemonk9/ae04688b47e66610562d06efbb1ffe48 to your computer and use it in GitHub Desktop.
Save firemonk9/ae04688b47e66610562d06efbb1ffe48 to your computer and use it in GitHub Desktop.
generate data with sequence
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