Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revisionBoth sides next revision
kb:pg:nasledjivanje_tabela [2019/11/14 12:30] – created nessakb:pg:nasledjivanje_tabela [2019/11/14 12:33] nessa
Line 2: Line 2:
  
 PostgreSQL ima mehanizam za nasleđivanje između tabela ([[https://www.postgresql.org/docs/10/ddl-inherit.html|https://www.postgresql.org/docs/10/ddl-inherit.html]]) PostgreSQL ima mehanizam za nasleđivanje između tabela ([[https://www.postgresql.org/docs/10/ddl-inherit.html|https://www.postgresql.org/docs/10/ddl-inherit.html]])
 +
 +<programlisting>
 +CREATE TABLE cities (
 +    name            text,
 +    population      float,
 +    altitude        int     -- in feet
 +);
 +
 +CREATE TABLE capitals (
 +    state           char(2)
 +) INHERITS (cities);
 +</programlisting>
  
  
  • kb/pg/nasledjivanje_tabela.txt
  • Last modified: 2019/11/14 12:50
  • by nessa