Yes, you are correct. The SHOW CREATE TABLE
command provides accurate details about the NULL constraints for each column in a table, whereas the DESCRIBE TABLE
command may show incorrect NULL constraints details. This discrepancy arises because SHOW CREATE TABLE
directly reflects the table's creation syntax, including all constraints applied at the time of creation. On the other hand, DESCRIBE TABLE
might not accurately capture or display all constraints, particularly if there have been subsequent modifications or if there are limitations in how it retrieves and presents constraint information.
For the most reliable and detailed information about table constraints, including NULL constraints, it is recommended to use the SHOW CREATE TABLE
command