create temporary table

    0

    0

    lucycodes42

    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.

    Shortcut: table.create.temporary

    
    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;
    
    
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.