1
  1. Is there an obvious difference between SQL and T-SQL?
  2. Which is used in a ASP.Net/C# application? or can either be used?

This might seem a bad question, but I have only recently heard the term T-SQL and wondering if there is an actual identifiable difference or is it just another fancy term to sound cool.

4
  • 1
    Google would have told you that "Transact-SQL (T-SQL) is Microsoft's and Sybase's proprietary extension to the SQL..." If you're using SQL Server, you'll be using T-SQL. Commented Jan 3, 2018 at 22:04
  • Yeah I get that. But which one is used with ASP.Net applications? Commented Jan 3, 2018 at 22:06
  • ASP.net can interact with many different database engines. The exact flavour of SQL you will be using is dependant on which engine you are using. Commented Jan 3, 2018 at 22:56
  • It is all clear now. Its just that Microsoft DB is called MS SQL, which gave me the impression SQL being proprietary. it all makes sense now, SQL generic language and MYSQL, MS SQL etc use their implementations of the generic SQL language. Commented Jan 3, 2018 at 23:06

2 Answers 2

1

SQL is the broad term for the language

T-SQL is a procedural extension to the language SQL. It is available through Microsoft SQL Server

If you decide to use SQL Server as your DB, you get SQL and the additional functionality of T-SQL which adds a long list of things, loosely covered in the link above. T-SQL isn't just a fancy term, it does add plenty of functionality, but most of that functionality exists in other DBs through other procedural language extensions.

Yes you can use SQL Server with ASP.NET and therefore T-SQL

Sign up to request clarification or add additional context in comments.

4 Comments

Ok Thanks. So if I get this right, when using SQL database with ASP.net application the queries are written in T-SQL.
When using a Microsoft SQL Server database (which is often used with ASP.NET), then yes. “SQL Database” is a general term.
Similarly you also have PL/SQL, which is Oracle Corporation's procedural extension for SQL, you might want to read about that as well.
@SANM2009 Think of SQL like the numbers 1-10, then think of T-SQL as math operators + - / * =. You can count 1-10 with just numbers, but if you want to do math you need to include operators, right? T-SQL and other procedural extensions are just like math operators are to numbers, they add more options which expand the uses of the language.
1

SQL is used to query databases for data

ASP.NET is for Web UI If you send native SQL commands to your database, you need to use standart ANSI SQL, but better with more functionality for the target database platform use specific SQL language created for that Data Platform.

Just a few of them,

  • Transact-SQL or T-SQL for Microsoft SQL Server
  • PL/SQL for Oracle
  • SQLScript for SAP HANA Database

Again in ASP.NET, the libraries you are using will provide objects that can be used for that database connection

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.