Anonymous

Not logged in

  • Log in
SQLZoo

CREATE and DROP Reference

From SQLZoo

Namespaces

  • Page
  • Discussion

More

  • More

Page actions

  • Read
  • View source
  • History

How to create tables, indexes, views and other things. How to get rid of them. How to change them.

CREATE and DROP Operations
CREATE a new table
DROP a table
Composite primary key
CREATE a foreign key
CREATE a VIEW
Autonumber fields
ALTER TABLE ... ADD COLUMN
ALTER TABLE ... DROP COLUMN
ALTER TABLE ... ADD constraint
CREATE TABLE problems: Invalid column name.
CREATE TABLE problems: Insufficient privileges.
CREATE TABLE problems: Table already exists.
DROP TABLE problems: Foreign key references.
CREATE TABLE problems: Foreign key references.
Rename column
DataWars, Data Science Practice Projects - LogoDataWars: Practice Data Science/Analysis with +100 Real Life Projects
  • Served by: ben at 2025-09-01T12:14
  • Retrieved from "https://sqlzoo.net/w/index.php?title=CREATE_and_DROP_Reference&oldid=501"

    Navigation

    • SELECT basics
    • quiz
    • SELECT from world
    • quiz
    • SELECT from nobel
    • quiz
    • SELECT in SELECT
    • quiz
    • SUM and COUNT
    • quiz
    • JOIN
    • quiz
    • More JOIN
    • quiz
    • Using NULL
    • quiz
    • Self JOIN
    • quiz

    Reference

    • NoSQL zoo
    • SELECT
    • Functions
    • SELECT .. WHERE
    • SELECT .. GROUP BY
    • SELECT .. JOIN
    • SELECT .. SELECT
    • INSERT .. VALUES
    • INSERT .. SELECT
    • UPDATE
    • DELETE
    • CREATE TABLE
    • CREATE VIEW
    • CREATE INDEX
    • DROP
    • ALTER
    • UNION
    • LEFT JOIN
    • NULL

    Navigation

    • Special pages

    Wiki tools

    Wiki tools

      Page tools

      Page tools

        User page tools

          More

          • What links here
          • Related changes
          • Printable version
          • Permanent link
          • Page information
          • Page logs
          • Powered by MediaWiki
          • This page was last modified on 10 July 2012, at 09:28.
          • Privacy policy
          • About SQLZoo
          • Disclaimers