Home > database >  Give advice or comments, thank you
Give advice or comments, thank you

Time:01-06

Need in the heart of the database system in the 2020 members of the integral reset,
If the statement is that the update data table name set integral numerical field name=0, this section of the statement date what to write,
Please teach, thank you, know the database is not very well,

CodePudding user response:

It depends on what your date field, if direct is a datetime type
You can directly

The update tab_name set score=0
Where date_column & gt;='20200101' and date_column & lt; '20210101'

CodePudding user response:

Can also use datepart take years, if be strings can intercept the year section
  • Related