``` create function get_next_id() returns int as ... create table mytable (id int default get_next_id()) ```