comment(--RANDOM SQL QUERIES THAT DO NOTHING INTERESTING) comment(--Copyright (C\) 2009 - Keith Pitt ) comment(--This program is free software: you can redistribute it and/or modify) comment(--it under the terms of the GNU General Public License as published by) comment(--the Free Software Foundation, either version 3 of the License, or) comment(--(at your option\) any later version.) comment(--This program is distributed in the hope that it will be useful,) comment(--but WITHOUT ANY WARRANTY; without even the implied warranty of) comment(--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the) comment(--GNU General Public License for more details.) comment(--You should have received a copy of the GNU General Public License) comment(--along with this program. If not, see .) comment(-- Comment: Drop table) class(DROP) type(TABLE) reserved(IF) reserved(EXISTS) stringoperator(;) comment(-- Create table) class(CREATE) type(TABLE) string operator(() string pre_type(varchar)operator(()integer(255)operator(\)) directive(default) pre_constant(NULL) operator(\)) reserved(ENGINE)operator(=)ident(InnoDB) directive(DEFAULT) directive(CHARSET)operator(=)ident(latin1)operator(;) comment(-- Drop table again) class(DROP) type(TABLE) reserved(IF) reserved(EXISTS) ident(customer)operator(;) comment(-- Create customers) class(CREATE) type(TABLE) ident(customer) operator(() ident(first_name) pre_type(char)operator(()integer(50)operator(\))operator(,) ident(last_name) pre_type(char)operator(()integer(50)operator(\))operator(,) ident(address) pre_type(char)operator(()integer(50)operator(\))operator(,) ident(city) pre_type(char)operator(()integer(50)operator(\))operator(,) ident(country) pre_type(char)operator(()integer(25)operator(\))operator(,) ident(birth_date) pre_type(date)operator(,) ident(created_at) pre_type(timestamp)operator(,) comment(-- Differnt sort of date here) ident(updated_at) pre_type(timestamp) operator(\)) comment(-- Create business) class(CREATE) type(TABLE) ident(business) operator(() ident(compant_name) pre_type(char)operator(()integer(50)operator(\))operator(,) ident(address) pre_type(char)operator(()integer(50)operator(\)) directive(default) stringoperator(,) comment(-- Oohh, defaults..) ident(city) pre_type(char)operator(()integer(50)operator(\)) directive(default) stringoperator(,) ident(country) pre_type(char)operator(()integer(150)operator(\)) directive(default) string operator(\)) comment(-- Some random table) class(DROP) type(TABLE) reserved(IF) reserved(EXISTS) ident(customer_statuses)operator(;) class(CREATE) type(TABLE) string operator(() comment(-- Auto incrementing IDs) string pre_type(smallint)operator(()integer(6)operator(\)) pre_type(unsigned) reserved(NOT) pre_constant(NULL) directive(auto_increment)operator(,) string pre_type(int)operator(()integer(10)operator(\)) pre_type(unsigned) reserved(NOT) pre_constant(NULL) directive(default) stringoperator(,) string pre_type(varchar)operator(()integer(15)operator(\)) directive(default) pre_constant(NULL)operator(,) string pre_type(date) directive(default) pre_constant(NULL)operator(,) string pre_type(smallint)operator(()integer(6)operator(\)) pre_type(unsigned) directive(default) pre_constant(NULL)operator(,) string pre_type(varchar)operator(()integer(100)operator(\)) directive(default) pre_constant(NULL)operator(,) reserved(PRIMARY) reserved(KEY) operator(()stringoperator(\)) operator(\)) reserved(ENGINE)operator(=)ident(InnoDB) directive(DEFAULT) directive(CHARSET)operator(=)ident(latin1)operator(;) comment(-- Try creating an index.) class(CREATE) type(INDEX) ident(customer_status_status_id) reserved(ON) ident(customer_statuses) operator(()ident(status_id)operator(\)) comment(/* Now lets try and make a really big table */) class(DROP) type(TABLE) reserved(IF) reserved(EXISTS) stringoperator(;) class(CREATE) type(TABLE) string operator(() string pre_type(int)operator(()integer(10)operator(\)) pre_type(unsigned) reserved(NOT) pre_constant(NULL) directive(auto_increment)operator(,) string pre_type(varchar)operator(()integer(15)operator(\)) directive(default) pre_constant(NULL)operator(,) string pre_type(varchar)operator(()integer(20)operator(\)) reserved(NOT) pre_constant(NULL) directive(default) stringoperator(,) string pre_type(varchar)operator(()integer(20)operator(\)) directive(default) pre_constant(NULL)operator(,) string pre_type(varchar)operator(()integer(30)operator(\)) reserved(NOT) pre_constant(NULL) directive(default) stringoperator(,) string pre_type(varchar)operator(()integer(50)operator(\)) directive(default) pre_constant(NULL)operator(,) string pre_type(varchar)operator(()integer(50)operator(\)) directive(default) pre_constant(NULL)operator(,) string pre_type(varchar)operator(()integer(10)operator(\)) directive(default) pre_constant(NULL)operator(,) string pre_type(smallint)operator(()integer(3)operator(\)) directive(default) pre_constant(NULL)operator(,) string pre_type(varchar)operator(()integer(15)operator(\)) directive(default) pre_constant(NULL)operator(,) string pre_type(varchar)operator(()integer(15)operator(\)) directive(default) pre_constant(NULL)operator(,) string pre_type(varchar)operator(()integer(15)operator(\)) directive(default) pre_constant(NULL)operator(,) string pre_type(varchar)operator(()integer(15)operator(\)) directive(default) pre_constant(NULL)operator(,) string pre_type(varchar)operator(()integer(50)operator(\)) directive(default) pre_constant(NULL)operator(,) string pre_type(date) directive(default) pre_constant(NULL)operator(,) string pre_type(int)operator(()integer(11)operator(\)) directive(default) pre_constant(NULL)operator(,) string pre_type(varchar)operator(()integer(100)operator(\)) directive(default) pre_constant(NULL)operator(,) string pre_type(char)operator(()integer(3)operator(\)) directive(default) pre_constant(NULL)operator(,) string pre_type(char)operator(()integer(1)operator(\)) directive(default) pre_constant(NULL)operator(,) string pre_type(varchar)operator(()integer(50)operator(\)) directive(default) pre_constant(NULL)operator(,) string pre_type(varchar)operator(()integer(50)operator(\)) directive(default) pre_constant(NULL)operator(,) reserved(PRIMARY) reserved(KEY) operator(()stringoperator(\)) operator(\)) reserved(ENGINE)operator(=)ident(InnoDB) directive(DEFAULT) directive(CHARSET)operator(=)ident(latin1)operator(;)