mysql語法學習

//transfer data between 2 MySQL databases with 2 databases on one and the same server
//select * from table between `lowerdate` and `upperdate`

INSERT INTO moveto.activity_img SELECT * FROM movefrom.activity_img where id between 1 and 2;

//delete from original database
DELETE FROM movefrom.activity_img where id between 1 and 2;

SELECT * FROM bulletin WHERE mdate < NOW( ) AND mdate >  '2014-05-21'
Previous
Next Post »