How to copy the contents of one table to another using SQL is not immediately obvious.
create table mytablecopy select * from originaltable
insert into originaltable select * from mytablecopy
MySQL does support sub-selects. For example you can do this:
select * from things where thing.userid not in (select userid from otherthings)
| Discuss on Forum | More Tutorials » |