Teach you a couple of dates. SQL Server statements for comparison

Source: Internet
Author: User
Tags comparison

After a problem, the moment to solve the problem, there is always a strong sense of achievement.

In the previous project, the background database used SQL Server, and the time comparison SQL was simple, which is generally the following form:

select * from table where time<'2006-09-12 00:00:00'

New project, the backstage use Oracle, just execute SQL statement in JSP, backstage always reported 500 error, system.out Some variables found, this kind of SQL writing cannot retrieve content. Check the manual, check Baidu, the original in Oracle time comparison of the SQL statement to be used in another way:

select * from oracletable where time<to_date('2006-09-12 00:00:00','yyyy-mm-dd hh24:mi:ss')

That's how it's done.

Suddenly feel, the development road is long, all the time can encounter the problem, any small place should pay attention to.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.