Wpis z mikrobloga

create table Filmy (IdFilmu serial primary key,
TytułFilmu varchar(100) not null,
RokProdukcji**int2**,
RodzajFilmu varchar(20));

create table FilmyAktorzy (IdFilmu **int8**,
IdAktora **int8**,
Rola varchar(20),
constraint kp primary key (IdFilmu, IdAktora),
constraint r foreign key (IdFilmu) references Filmy (IdFilmu)
on delete cascade on update restrict);

- postgresql, dlaczego to co pogrubiłem np 'int8' nie nie powinno być 'int(8)', taka składnia czy jak?
- RokProdukcjiint2 , chodzi tutaj że rok produkcji składa się z dwóch cyfr?

#naukprogramowania
  • 4
@d1l4x: to powiedz im by sie jebnęli jak wymagają polskich, gdzie standardem sa angielskie w branży.

Sprawdzilem btw dla Ciebie:

SQL only specifies the integer types integer (or int), smallint, and bigint. The type names int2, int4, and int8 are extensions, which are also used by some other SQL database systems.


W skrócie wygląda to tak ze podajesz ile bajtów ma trzymać integer a nie jak dlugi ma byc integer