Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To set all but one integer field to zero during an insert operation in MySql, you can use the following query:

INSERT INTO table_name (field1, field2, field3)
VALUES (value1, 0, 0);

In this example, the fields "field2" and "field3" will be set to zero while "field1" will contain the specified value "value1". To update other fields besides "field1", modify the query to include those fields and set their values to zero.