cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Get Started Discussions
Start your journey with Databricks by joining discussions on getting started guides, tutorials, and introductory topics. Connect with beginners and experts alike to kickstart your Databricks experience.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

DESCRIBE Table and SHOW CREAT TABLE shows contradictory NULL constraints

MBhaskar
New Contributor

SHOW CREATE TABLE provides correct NULL constraints details of each column where as DESCRIBE TABLE shows wrong NULL constraints details? 

1 REPLY 1

Alberto_Umana
Databricks Employee
Databricks Employee

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

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local communityโ€”sign up today to get started!

Sign Up Now