Tuesday, February 24, 2009

I don't use this command often, so I easily forget it

I needed to make a duplicate database, but just the structure. I can never remember how to do it. At first I was just going to copy the original design, but then I realised I'd have to update that as it's pretty much out of date.

Instead I used my trusty friend google, and finally found the command I was after. Like.

Yep: create table db.tablename like db2.tablename;

That's how easy it is.. boy I love MySQL!


No comments:


Made by Lena