cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

Can a not null constraint be applied on a identity column

harish446
New Contributor

I had a table creation script as follows for example:

 CREATE TABLE default.test2
          (  id BIGINT GENERATED BY DEFAULT AS IDENTITY(),
                name  String)
using delta
location "/mnt/datalake/xxxx"
 
 
What are the possible ways to apply not null constraint on the existing delta table on id column
 
1 REPLY 1

Krishnamatta
New Contributor III

Hi Harish,

Here is the documentation for this issue

https://docs.databricks.com/en/tables/constraints.html

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.