Such as: 'the 2019-08-05 10:00:00'
Queries can be directly compared with a time string
Select * from TB where createtime & gt; 'the 2019-08-04 08:00:00';
Is to get the correct result set, want to know here is createtiem first and at the back of the '2019-08-04 08:00:00' implicit transformation converts the date type, comparison, or a direct comparison of the location of the string ASCII?
CodePudding user response:
To directly compare the stringCodePudding user response:
Under this scenario, the two values are varchar, affirmation is to directly compare, will not do any form of conversion,CodePudding user response:
Definition, why not just use the date type to dig a hole yourself,CodePudding user response:
Two values are varchar, can direct comparison