Forum Discussion
Lakehouse table datatypes
- Anonymous2 years ago
Hi Soobramoney ,
For this type of problem, you can make sure that the columns are defined with the correct data types when you create a new table, and allow null values if necessary.
The following demonstrates the successful insertion of a NULL value in a table:
CREATE TABLE [NullCheck1] ( col1 int not null, col2 VARCHAR(30) NULL, col3 VARCHAR(30) not NULL, col4 int NULL ) GO INSERT INTO [NullCheck1] VALUES (3,NULL,'NA',NULL) select * from [dbo].[NullCheck1]Best Regards,
Adamk KongIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Soobramoney ,
For this type of problem, you can make sure that the columns are defined with the correct data types when you create a new table, and allow null values if necessary.
The following demonstrates the successful insertion of a NULL value in a table:
CREATE TABLE [NullCheck1]
(
col1 int not null,
col2 VARCHAR(30) NULL,
col3 VARCHAR(30) not NULL,
col4 int NULL
)
GO
INSERT INTO [NullCheck1] VALUES (3,NULL,'NA',NULL)
select * from [dbo].[NullCheck1]
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.