Insert empty string into INT column for SQL Server

后端 未结 5 1405
傲寒
傲寒 2020-12-17 16:30

A SAMPLE table has only one column ID of type int, default null.

In Oracle when I do:

  insert into SAMPLE (ID         


        
5条回答
  •  余生分开走
    2020-12-17 16:50

    You can't insert a 'string' into a int column. Oracle must be just handling that for you.

    Just try inserting NULL if that's what you need.

    insert into SAMPLE (ID) values (NULL);
    

提交回复
热议问题