SQL public snippets
The code creates a temporary table with the given name. The table has an ID column and a name column, each of which is a string. The table also has a primary key column that is based on the ID column.
DROP TABLE IF EXISTS `table_name`; CREATE TEMPORARY TABLE IF NOT EXISTS `table_name` ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, `name` VARCHAR(255), PRIMARY KEY `pk_id`(`id`) ) ENGINE = MEMORY;