I use a prepared and parameterized INSERT-Script to insert data into a
MySQL database. Sometimes I want to insert the default value into a
column like its done with SQL:
Code: Select all
INSERT INTO myTable (field1, field2) VALUES ("text", "anotherText");
INSERT INTO myTable (field1, field2) VALUES ("text", DEFAULT); // <- Insert Default
Code: Select all
command.Parameters[1] = "DEFAULT";
Regards,
Florian Heinemann
Software developer for dbcopy.com