如果我在mysql表中用“when”[duplicate]命名一个字段会发生什么

I created a table with 3 columns ID (Primary key), when (some varchar value), Created_date(timestamp)

Will naming a field with "When" creates any issue?

I have been querying like update table set table.when='$when' where ID='1'

Please suggest

</div>

it's ok as long as you have to use the tableName along with the column name

update `table` 
set `table`.when='$when' 
where ID='1'

otherwise, wrap it with backticks

update `table` 
set `when`='$when' 
where ID='1'

Other Link:

if possible don't use names or identifiers which are on the reserved keyword list to avoid problems.