Create a TEMPORARY TABLE;
CREATE TABLE fullauthors (
authName varchar(60),
authID int(11)
);
INSERT INTO fullauthors VALUES ('Asimov Isaac',62),
('Atwood Margaret',66),
('Bear Greg',67);
CREATE TEMPORARY TABLE tmp
SELECT authID, authName FROM fullauthors WHERE authID<20;
drop table fullauthors;
Related examples in the same category