Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
大家好)我有桌子和几行。如何打印特定日期的所有结果?像这样的具体日期 - 30.01.2013 。以前保存在 $date 中的日期(在变量中)。
谷歌帮助了我),但它是上个月的..:
select id from tab where date_format(real_time, '%Y%m') = date_format(date_add(now(), interval -1 month), '%Y%m');
保存在 TIMESTAMP 行中的日期。
select ... from ... where real_time = '2013-01-30'