create table

    0

    0

    lucycodes42

    SQL public snippets

    This code creates a table named "&[USER_INPUT:1]:table_name" in the database "&[DB_NAME]". The table has an ID column with an auto-increment, a name column with a VARCHAR(55) column, and a primary key column that references the ID column.

    Shortcut: table.create

    DROP TABLE IF EXISTS `table_name`;
    CREATE TABLE `table_name` (
      `id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
      `name` VARCHAR(255),
      PRIMARY KEY `pk_id`(`id`)
    );
    
    
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    Legal
    • Security
    • Privacy Policy
    • Code Privacy
    • Terms of Service
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.