Skip to content

Instantly share code, notes, and snippets.

/txt Secret

Created September 1, 2014 11:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/c2d91f13d258948bbc5a to your computer and use it in GitHub Desktop.
Save anonymous/c2d91f13d258948bbc5a to your computer and use it in GitHub Desktop.
CREATE TEMPORARY TABLE temp (
id int unsigned primary key auto_increment,
user_id int unsigned,
start datetime,
end datetime
);
INSERT into temp (user_id, start, end) VALUES (
1, 20130101, null
);
INSERT into temp (user_id, start, end) VALUES (
1, 20120101, 20130201
);
INSERT into temp (user_id, start, end) VALUES (
2, 20130101, 20130201
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment