SQL delete database

Source: Internet
Author: User
Tags sql delete database

SQL delete database

SQL delete database tables

Use the drop table command in SQL to delete a table and all records in the table. The format of the drop table command is as follows:

Drop table tablename;

For example, drop table employee. If you want to delete a database table completely, you only need to enter the name of the table you want to delete after the drop table command. The drop table command is different from deleting all records in a table. After deleting all records in the table, the table still exists, and the column information in the table does not change. Using the drop table command, all information about the entire database table is deleted.

The preceding sections describe the main Commands and statements of the SQL language in detail. It should be said that the syntax structure and style of SQL statements are quite simple and intuitive. As long as you practice more in combination, you will be able to quickly grasp it in the short term.

Taking the Store_Information data table as an example, we can set the following field and data table alias in the SQL command used in the GROUP BY section:

SELECT A1.store _ name Store, SUM (Sales) "Total Sales" FROM Store_Information A1 group by A1.store _ name: store Total Sales Los Angeles $1800 San Diego $250 Boston $700

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.