SQL - Drop Table - 1keydata
SQL - Drop Table - 1keydata
SQL Tutorial
Basic SQL Commands
SQL SELECT
SQL DISTINCT
SQL WHERE SQL > Data Definition Language (DDL) > Drop Table Statement
SQL AND OR
Sometimes we may decide that we need to get rid of a table in the database. In fact, it would be problematic if we cannot
SQL IN
this could create a maintenance nightmare for the DBA's. Fortunately, SQL allows us to do it, as we can use the DROP TAB
SQL BETWEEN
SQL Wildcard The syntax for DROP TABLE is,
SQL LIKE
SQL ORDER BY DROP TABLE "table_name";
SQL GROUP BY
SQL HAVING If we wanted to drop the Customer table that we created in the CREATE TABLE section, we simply type,
SQL ALIAS
SQL AS DROP TABLE Customer;
SQL SELECT UNIQUE
SQL JOIN Drop Multiple Tables At The Same Time
SQL INNER JOIN
SQL OUTER JOIN It is possible to drop more than one table at a time. To do that, list the names of all the tables we wish to drop separated b
SQL LEFT OUTER JOIN DROP TABLE. For example, if we want to drop the User_Details table and the Job_List table together, we can issue the foll
SQL CROSS JOIN statement:
SQL INSERT INTO
SQL INSERT INTO SELECT DROP TABLE User_Details, Job_List;
SQL UPDATE
SQL DELETE FROM IF EXISTS
Advanced SQL
SQL UNION When we attempt to drop a table that does not exist, an error will result. To prevent this type of error from happening, som
SQL UNION ALL such as MySQL and Oracle allow an optional "IF EXISTS" phrase between DROP TABLE and the table name(s). This tells th
SQL Inline View
execute the DROP TABLE statement only if the table to be dropped already exists. If the table does not exist, nothing is ex
is no error message. The following is an example of a DROP TABLE IF EXISTS statement:
SQL INTERSECT
SQL MINUS
DROP TABLE IF EXISTS Customer;
SQL LIMIT
SQL TOP
Next: SQL TRUNCATE TABLE
SQL Subquery
SQL EXISTS
SQL CASE
SQL DECODE
SQL AUTO INCREMENT
SQL IDENTITY
SEQUENCE & NEXTVAL
SQL Functions
Copyright © 2016 1keydata.com All Rights Reserved Privacy Policy About Contact
SQL Average
SQL COUNT
SQL MAX
SQL MIN
SQL SUM
SQL ROUND
String Functions
SQL CAST
SQL CONVERT
SQL CONCATENATE
SQL SUBSTRING
SQL INSTR
SQL TRIM
http://www.1keydata.com/sql/sqldrop.html 1/1