mirror of
https://github.com/postgres/postgres.git
synced 2026-05-14 04:37:40 -04:00
97b4e5ad30
Rod Taylor
13 lines
487 B
SQL
13 lines
487 B
SQL
--
|
|
-- insert with DEFAULT in the target_list
|
|
--
|
|
create table inserttest (col1 int4, col2 int4 NOT NULL, col3 text default 'testing');
|
|
insert into inserttest (col1, col2, col3) values (DEFAULT, DEFAULT, DEFAULT);
|
|
insert into inserttest (col2, col3) values (3, DEFAULT);
|
|
insert into inserttest (col1, col2, col3) values (DEFAULT, 5, DEFAULT);
|
|
insert into inserttest values (DEFAULT, 5, 'test');
|
|
insert into inserttest values (DEFAULT, 7);
|
|
|
|
select * from inserttest;
|
|
drop table inserttest;
|