Hello, If you have used phpmyadmin, you might have noticed while creating a table there are few optional fields asked by phpmyadmin along with the table name like tablename | Datatype | Length | Default etc etc Not my question is how do you make use of this Default field? I know it puts a value when inserting a data into the mysql database, but suppose I have a table with some values into it, can I restore the default value in my table with the current values? if yes how? Plz Help, Thanx
default value is inserted to your table when you do an insert query without specifying the field. let say you have fields : name and address and you have default value of "john" for your name. when you do insert into table_name set address = "lake idaho" your tables will be populated with a row containing "john" on the `name` field and "lake idaho" on the address field. when you do insert into table_name set address = "lake idaho", name = "jake" your tables will be populated with a row containing "jake" on the `name` field and "lake idaho" on the address field. does this answer your question? pardon my english please.