CREATE TABLE IF NOT EXISTS `table_name` (
        `id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
        `name` VARCHAR(255),
        PRIMARY KEY `pk_$`(`$`)
      );
      
      
      Sql language logo

      create table

      SQL public snippets

      The preceding code creates a table if it does not already exist. The table has an ID column and a name column, both of which are text fields. The table is a primary key column, with the ID field being the primary key.

      Shortcut: table.create

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.