David Pintassilgo Posted December 8, 2007 at 12:37 PM Report Share #153071 Posted December 8, 2007 at 12:37 PM Boas. Eu tenho uma tabela criada em mysql e preciso de criar mais 8 praticamente iguais. O nome muda mas o resto é tudo complectamente igual. Há alguma forma prática/Rápida de fazer cada uma delas logo de uma só vez? um comando 'maravilha' qualquer? 😛 cool stuffs to check. http://blog.zxcoders.com// Link to comment Share on other sites More sharing options...
pedrotuga Posted December 8, 2007 at 12:49 PM Report Share #153075 Posted December 8, 2007 at 12:49 PM Create table tablename as select * from othertablename where .... Nunca fiz isto no mysql, mas deve funcionar, vê o manual para mais detalhes Link to comment Share on other sites More sharing options...
David Pintassilgo Posted December 8, 2007 at 12:54 PM Author Report Share #153077 Posted December 8, 2007 at 12:54 PM Fiz: CREATE TABLE tabela_nova AS SELECT * FROM tabela_que_ja_havia ...e aparentemente.. 5 estrelas! 😄 Era até mais simples que imaginava. Só teve um pequeno problema, levou tambem os dados e não era para levar,.. mas na boa! 😄 Acho que ficou resolvido! 😛 cool stuffs to check. http://blog.zxcoders.com// Link to comment Share on other sites More sharing options...
pedrotuga Posted December 8, 2007 at 11:57 PM Report Share #153198 Posted December 8, 2007 at 11:57 PM Isto deve funcionar: CREATE TABLE tabela_nova AS SELECT * FROM tabela_que_ja_havia WHERE 0 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now