- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Why MySQL uses the interval like 7 day and 2 hour instead of 7 days and 2 hours?
152 Lectures 16 hours
87 Lectures 5.5 hours
The reason behind this concept is that MySQL requires the unit keywords to be singular, regardless of the English grammar rules. If we will try to supply intervals like 7 days, 2 hours etc then MySQL will produce syntax error as follows −
mysql> Select '2017-02-25 05:04:30' + INTERVAL 2 days; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'days' at line 1
- How to install install mariadb 10 2 centos 7
- Sum of first N natural numbers which are divisible by 2 and 7 in C++
- Finding n-th number made of prime digits (2, 3, 5 and 7) only in C++
- Find sum of the series 1-2+3-4+5-6+7....in C++
- Add 2 hours to current time in MySQL?
- 3 and 7 in Python
- Find n-th element in a series with only 2 digits (and 7) allowed in C++
- Fetch datetime row from exactly past 7 days records in MySQL
- Exceptions and Error in PHP 7
- Sum of the series 2^0 + 2^1 + 2^2 +...+ 2^n in C++
- Display array structure and values in PHP 7
- MySQL query to find expiry date (record) from the next 2 days?
- How to convert a MySQL TIME value to days and hours form?
- MySQL query to add days with interval of 45 days and display the output in a new column
- Sum of series 1^2 + 3^2 + 5^2 + . . . + (2*n – 1)^2