Just some BASIC MYSQL code that when imported creates a database with two tables and a few fields.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
CREATE DATABASE IF NOT EXISTS `testcreate` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; USE `testcreate`; DROP TABLE IF EXISTS `table1`; CREATE TABLE IF NOT EXISTS `table1` ( `id` int(11) NOT NULL AUTO_INCREMENT, `client` varchar(50) NOT NULL, `conversions` int(6) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ; DROP TABLE IF EXISTS `users`; CREATE TABLE IF NOT EXISTS `users` ( `id` int(10) NOT NULL AUTO_INCREMENT, `name` varchar(20) NOT NULL, `password` varchar(20) NOT NULL, `message` varchar(1) NOT NULL, `note` varchar(200) NOT NULL, `sender` varchar(20) NOT NULL, `date` datetime NOT NULL, `client_name` varchar(50) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ; |