Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> NOT NULL default ' ' ?
martins
post
Post #1





Grupa: Zarejestrowani
Postów: 5
Pomógł: 0
Dołączył: 4.04.2009

Ostrzeżenie: (0%)
-----


Jaka jest różnica między

Username varchar(16) NOT NULL default ' ',

a

Username varchar(16) NULL,
Go to the top of the page
+Quote Post
nospor
post
Post #2





Grupa: Moderatorzy
Postów: 36 557
Pomógł: 6315
Dołączył: 27.12.2004




taka jak widac.
W pierwszym przypadku wartością pola nie moze byc null, a w drugim moze. Czego w tej logice nie rozumiesz?
Go to the top of the page
+Quote Post
martins
post
Post #3





Grupa: Zarejestrowani
Postów: 5
Pomógł: 0
Dołączył: 4.04.2009

Ostrzeżenie: (0%)
-----


w DEFAULT jest ' ' , czyli puste. Tego nie rozumiem!
Go to the top of the page
+Quote Post
nospor
post
Post #4





Grupa: Moderatorzy
Postów: 36 557
Pomógł: 6315
Dołączył: 27.12.2004




'' - to jest pusty string. ale to nadal jest string
NULL - to jest NULL - NIC. Ani string, ani liczba, ani krasnoludek. Poprostu NIC (IMG:style_emoticons/default/smile.gif)
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 23.08.2025 - 14:05