Rubens José Rodrigues wrote: > > Pessoal, > > Li a documentação, tentei mas nao consegui criar uma trigger, por favor > me ajudem. > > Estrutura da tabela > > TESTE > SEQ INT NOT NULL, > DESCRICAO VARCHAR(40) > > > Trigger > Before Insert > Criar um "auto-incremento" via trigger, como faço no oracle; > > select nvl(max(seq),0)+1 into nome_da_variavel from teste into >
Veja o texto do Diogo Biazus em: http://www.postgresql.org.br/Documenta%c3%a7%c3%a3o item Triggers e Funções - Tutorial de PL/PgSQL Você pode baixar ou no formato odt ou pdf []s Osvaldo -- View this message in context: http://www.nabble.com/Criacao-de-Trigers.-tf3806695.html#a10790088 Sent from the PostgreSQL - Brasil mailing list archive at Nabble.com.
_______________________________________________ pgbr-geral mailing list [email protected] https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
