cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Community Platform Discussions
Connect with fellow community members to discuss general topics related to the Databricks platform, industry trends, and best practices. Share experiences, ask questions, and foster collaboration within the community.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

DESCRIBE Table and SHOW CREAT TABLE shows contradictory NULL constraints

MBhaskar
Visitor

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

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group