Difference Between SQL and T-SQL

  • 63
  • 0

Difference Between SQL and T-SQL
 

Difference Between SQL and T-SQL

 

Microsoft added code to SQL and called it Transact-SQL or T-SQL. 

原本就有SQL這個東西,微軟在SQL增加了一些程式新功能,稱為 T-SQL. 

 

Another significant difference between T-SQL and SQL 

is the changes done to the DELETE and UPDATE commands 

that are already available in SQL. 

 

With T-SQL, the DELETE and UPDATE commands both allow the 

inclusion of a FROM clause which allows the use of JOINs.

 

 

有一個重要的差異在T-SQL 與 SQL 之前,

SQL : 有DELETE(刪除) 與 UPDATE(更新)指令

T-SQL的 : 有DELETE(刪除) 與 UPDATE(更新)指令之外,在FROM後面可以加上 JOIN,

          如:

  

DELETE w 

FROM   workrecord2 w 

   INNER JOIN employee e 

   ON EmployeeRun = EmployeeNo 

WHERE  Company = '1' 

   AND Date = '2013-05-06' 

   

Summary:

1.SQL is a programming language while T-SQL is an extension to SQL.

2.T-SQL is proprietary while SQL is an open format.

3.T-SQL contains procedural programming, local variable, and such while SQL does not.

4.T-SQL is Turing complete while SQL is not.

5.T-SQL has a different implementation of DELETE and UPDATE than SQL.

6.T-SQL is best if you use Microsoft SQL servers

資料來源    

http://www.differencebetween.net/technology/software-technology/difference-between-sql-and-t-sql/

範例

https://stackoverflow.com/questions/16481379/how-to-delete-using-inner-join-with-sql-server?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa