Your cart is currently empty!
Category: t Sql
-
Khóa học miễn phí T-SQL – Overview nhận dự án làm có lương
T-SQL – Overview
In 1970”s the product called ”SEQUEL”, structured English query language, developed by IBM and later SEQUEL was renamed to ”SQL” which stands for Structured Query Language.
In 1986, SQL was approved by ANSI (American national Standards Institute) and in 1987, it was approved by ISO (International Standards Organization).
SQL is a structure query language which is a common database language for all RDBMS products. Different RDBMS product vendors have developed their own database language by extending SQL for their own RDBMS products.
T-SQL stands for Transact Structure Query Language which is a Microsoft product and is an extension of SQL Language.
Example
MS SQL Server – SQLT-SQL
ORACLE – SQLPL-SQL
Khóa học lập trình tại Toidayhoc vừa học vừa làm dự án vừa nhận lương: Khóa học lập trình nhận lương tại trung tâm Toidayhoc
Khóa học miễn phí T-SQL – Drop Tables nhận dự án làm có lương
T-SQL – Drop Tables
The SQL Server DROP TABLE statement is used to remove a table definition and all data, indexes, triggers, constraints, and permission specifications for that table.
Note − You have to be careful while using this command because once a table is deleted then all the information available in the table would also be lost forever.
Syntax
Following is the basic syntax of DROP TABLE statement −
DROP TABLE table_name;
Example
Let us first verify CUSTOMERS table and then we will delete it from the database −
Exec sp_columns CUSTOMERS;
The above command shows the following table.
TABLE_QUALIFIER TABLE_OWNER TABLE_NAME COLUMN_NAME DATA_TYPE TYPE_NAME PRECISION LENGTH SCALE RADIX NULLABLE REMARKS COLUMN_DEF SQL_DATA_TYPE SQL_DATETIME_SUB CHAR_OCTET_LENGTH ORDINAL_POSITION IS_NULLABLE SS_DATA_TYPE TestDB dbo CUSTOMERS ID 4 int 10 4 0 10 0 NULL NULL 4 NULL NULL 1 NO 56 TestDB dbo CUSTOMERS NAME 12 varchar 20 20 NULL NULL 0 NULL NULL 12 NULL 20 2 NO 39 TestDB dbo CUSTOMERS AGE 4 int 10 4 0 10 0 NULL NULL 4 NULL NULL 3 NO 56 TestDB dbo CUSTOMERS ADDRESS 1 char 25 25 NULL NULL 1 NULL NULL 1 NULL 25 4 YES 39 TestDB dbo CUSTOMERS SALARY 3 decimal 18 20 2 10 1 NULL NULL 3 NULL NULL 5 YES 106
CUSTOMERS table is available in the database, so let us drop it. Following is the command for the same.
DROP TABLE CUSTOMERS; Command(s) completed successfully.
With the above command, you will not get any rows.
Exec sp_columns CUSTOMERS; No rowsdata will be displayed
Khóa học lập trình tại Toidayhoc vừa học vừa làm dự án vừa nhận lương: Khóa học lập trình nhận lương tại trung tâm Toidayhoc