SQL与T-SQL
查询语言用于访问和操纵数据库。SQL和T-SQL是当今使用的两种流行查询语言。结构化查询语言(SQL)是用于数据库的计算机语言。它用于在关系数据库管理系统(RDMS)中访问和操纵数据。T-SQL(Transact SQL)是Microsoft开发的SQL的扩展。T-SQL是Microsoft SQL Server中使用的查询语言。
SQL
SQL的功能插入数据哒tabase, query data for information, update/ delete data in a database and create/modify the database schema. SQL was developed by IBM in early 1970s and was initially called SEQUEL (Structured English Query Language). SQL language has several language elements called clauses, expressions, predicates, queries and statements. Among these, most widely used are the queries. Queries are defined by the user in such a way that he/she describes the desired properties of the subset of data that he/she needs to retrieve from the database. Then the Database Management System performs the necessary optimization to the query and executes the necessary physical operations to produce the results of the query. SQL also allows data types such as character strings, bit strings, numbers and date and time to be included in columns of the databases. American National Standard Institute (ANSI) and International Organization for Standardization (ISO) adopted SQL as a standard in 1986 and 1987 respectively. Even though SQL is an ANSI standard, there are many different versions of the SQL language. But to comply with the ANSI standard all of these versions support the widely used commands such as SELECT, UPDATE, DELETE, INSERT, WHERE in a similar manner.
T-SQL
T-SQL是Microsoft开发的SQL的扩展。T-SQL通过添加多个功能,例如程序编程,本地变量和支持字符串/数据处理的支持功能来扩展SQL。这些功能使T-SQL图灵完整。需要与Microsoft SQL Server通信的任何应用程序都需要向服务器发送T-SQL语句。T-SQL使用以下关键字提供流量控制功能:开始和结束,断开,继续,goto,如果及其他,返回,waitfor等。此外,T-SQL允许添加从子句添加a从子句中删除和更新语句。从子句中的这将允许插入加入以删除和更新语句。T-SQL还允许使用批量插入语句将倍数排入表中。这将通过读取包含数据的外部文件来将多行插入表中。使用散装插入可以提高性能,而不是使用需要插入的每行单独的插入语句。
What is the difference between SQL and T-SQL?
SQL是一种用于数据库的计算机语言,具有将数据插入数据库,查询信息,在数据库中更新/删除数据并创建/修改数据库架构的功能,而T-SQL通过添加多个功能扩展了SQL。T-SQL由Microsoft开发,主要用于Microsoft SQL Server。这些功能包括程序编程,本地变量和用于字符串/数据处理的支持功能。T-SQL还允许使用SQL中不可用的批量插入语句将倍数排入表中。此外,T-SQL允许在删除和更新语句中包含a子句。
发表评论