Re: Question about date
Does this help?
CREATE TABLE t (
id int(10) unsigned NOT NULL AUTO_INCREMENT,
name varchar(20) NOT NULL,
joined date NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
INSERT INTO t (name,joined) VALUES ('John', '2010-09-01'),
('Paul', '2010-09-30'),
('George', '2010-10-01'),
('Ringo','2010-11-01');
mysql>SELECT NAME FROM t WHERE joined BETWEEN '2010-10-01' AND '2010-10-31';
+--------+
| NAME |
+--------+
| George |
+--------+
1 row in set (0.00 sec)
Good luck,
Barry.
Subject
Written By
Posted
Re: Question about date
April 07, 2014 08:56PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.