MyWebSQL icon indicating copy to clipboard operation
MyWebSQL copied to clipboard

Changing table data to NULL doesn't work...requires a workaround

Open odonov8 opened this issue 3 years ago • 1 comments

The "Update Records" tab has issues when I change table data to NULL

Let's say I have a table called "table_name" and column "column_name". I set Data Type = int, Length = 6, and Default value = NULL. And let's say the data under "column_name" is 24. When I try to retype the data NULL and then click on "Update Records", I get the following error:

Error occurred while executing the query: Incorrect integer value: 'NULL' for column 'column_name' at row 1 1 UPDATE table_name SET column_name="NULL" WHERE id="11"

The only workaround I could find for this is copying the query and then removing the quotes around the "NULL" like this: UPDATE table_name SET column_name=NULL WHERE id="11"

then I select the UPDATE query, click on the "Query" tab, and all is good.

Is there any other workaround for this?

odonov8 avatar Apr 10 '22 02:04 odonov8

You have to use the hotkey 'Shift + Delete' on Windows and 'Fn + Backspace' on Mac when editing the column. This will properly generate sql with NULL instead of "NULL" command.


Samnan ur Rehman Consultant / Senior Software Developer about.me/samnan

On Sun, Apr 10, 2022 at 7:40 AM odonov8 @.***> wrote:

The "Update Records" tab has issues when I change table data to NULL

Let's say I have a table called "table_name" and column "column_name". I set Data Type = int, Length = 6, and Default value = NULL. And let's say the data under "column_name" is 24. When I try to retype the data NULL and then click on "Update Records", I get the following error:

Error occurred while executing the query: Incorrect integer value: 'NULL' for column 'column_name' at row 1 1 UPDATE table_name SET column_name="NULL" WHERE id="11"

The only workaround I could find for this is copying the query and then removing the quotes around the "NULL" like this: UPDATE table_name SET column_name=NULL WHERE id="11"

then I select the UPDATE query, click on the "Query" tab, and all is good.

Is there any other workaround for this?

— Reply to this email directly, view it on GitHub https://github.com/Samnan/MyWebSQL/issues/57, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGVEICZMOO7TI6R5KVT4UTVEI5SJANCNFSM5TAEMLSQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Samnan avatar Oct 11 '22 07:10 Samnan