fbpx
Skip to main content
  1. Nuelz
  2. S.O.S. Computer
  3. Martedì, 15 Maggio 2007
  4.  Subscribe via email
Ho un problema con MySQL. Praticamente non mi riconosce più valori vuoti. Mi spiego: se eseguo questa query di inserimento valori

INSERT INTO [tabella] VALUES ('','','')

se quei tre campi hanno NOT NULL settato, la query non mi da errore per dei campi vuoti, bensì riempe la tabella con tre campi, appunto, vuoti.

Sono andato a cercare sul manuale di SQL e ho trovato questo:

"Strict mode controls how MySQL handles input values that are invalid or missing. A value can be invalid for several reasons. For example, it might have the wrong data type for the column, or it might be out of range. A value is missing when a new row to be inserted does not contain a value for a non-NULL column that has no explicit DEFAULT clause in its definition. (For a NULL column, NULL is inserted if the value is missing."

ma sinceramente, pur avendo settato il DB in Strict mode, non cambia nulla. Qualcuno può aiutarmi?!
Comment
There are no comments made yet.
Accepted Answer Pending Moderation
pur non avendo capito a pieno la parte inglese (e allora tu mi dirai "se non hai capito che parli a fare?";) penso che tu non commetta un errore: assegni a tre campi tre valori stringa con nessun carattere presente. questo è diverso dall'assegnargli NULL come valore. prova a vedere se questo può suggerirti qualcosa.
Comment
There are no comments made yet.
  1. more than a month ago
  2. S.O.S. Computer
  3. # 1
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!