joaofabioma

table ron

May 25th, 2022 (edited)
606
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- Table: datawork.ron
  2.  
  3. -- DROP TABLE IF EXISTS datawork.ron;
  4.  
  5. CREATE TABLE IF NOT EXISTS datawork.ron
  6. (
  7.     id BIGSERIAL NOT NULL,
  8.     col1 smallint NOT NULL DEFAULT (((random() * (8)::double precision) + (1)::double precision))::smallint,
  9.     col2 smallint NOT NULL DEFAULT (((random() * (8)::double precision) + (1)::double precision))::smallint,
  10.     col3 smallint NOT NULL DEFAULT (((random() * (8)::double precision) + (1)::double precision))::smallint,
  11.     col4 smallint NOT NULL DEFAULT (((random() * (8)::double precision) + (1)::double precision))::smallint,
  12.     col5 smallint NOT NULL DEFAULT (((random() * (8)::double precision) + (1)::double precision))::smallint,
  13.     CONSTRAINT ron_pkey PRIMARY KEY (id)
  14. )
  15.  
  16. TABLESPACE pg_default;
  17.  
  18. ALTER TABLE IF EXISTS datawork.ron
  19.     OWNER to postgres;
  20.    
  21. INSERT INTO datawork.ron DEFAULT VALUES;
  22.  
  23. SELECT * FROM datawork.ron;
Add Comment
Please, Sign In to add comment