1

I have a project to do using T-SQL. So i want to know whether MySQL is also a T-SQL?

Or T-SQL means only SQL server?

The questions says "create a relational database using T-SQL" Does that mean i have to do in SQL server?

Manu
  • 53
  • 2
  • 3
  • 8
  • 8
    No. T-SQL is the scripting language for SQL Server (and Sybase). – Gordon Linoff Jul 01 '17 at 12:27
  • The questions says "create a relational database using T-SQL" Does that mean i have to do in SQL server? and can't use mysql? – Manu Jul 01 '17 at 12:50
  • A google search on t-sql would have given you the answer in less time than it took for you to write this question. Your question suggests that you are learning how to be either a programmer or dba. Both these professions require problem solving skills that exceed what you just displayed. At the risk of sounding mean, those professions might not be a good match for you. – Dan Bracuk Jul 01 '17 at 13:58

3 Answers3

7

Almost every database has an explicit scripting language (or just "language"). This is the language used for defining stored procedures, functions, and triggers. It can also be used for scripting. The scripting language is defined by ANSI standard, but differences are even more pronounced than for queries and data definitions. You can view DDL (data definition language) and DML (data manipulation language) as subsets of the scripting language.

The scripting language for Sybase and SQL Server is called T-SQL. Strictly speaking, SQL Server is the database and T-SQL is the language, but the two are often used interchangeably when referring to code.

MySQL's scripting language is documented in the reference manual. It is quite different from T-SQL. The first major difference you will probably encounter is that IF is only allowed in programming blocks. The second will be the delimiter, then the word go, and the differences multiply from there.

Gordon Linoff
  • 1,242,037
  • 58
  • 646
  • 786
4

T-SQL means only SQL server?

T-SQL works, as Gordon said, in Microsoft SQL Server and Sybase. It does not work in MySQL; that rdbms uses a different SQL dialect.

If your instruction says "create a database using T-SQL", that means you must use Microsoft SQL Server or maybe Sybase. It's a strange insruction, though: the choice of database server make and model can have tremendous cost implications. If you're doing this for a database that might grow large and last a long time, you would be wise to ask the person who gave you that instruction.

O. Jones
  • 103,626
  • 17
  • 118
  • 172
  • The questions says "create a relational database using T-SQL" Does that mean i have to do in SQL server? and can't use mysql? – Manu Jul 01 '17 at 12:48
1

No, MySQL is not the same as T-SQL. Please see the following link for more details: What is the difference between SQL, PL-SQL and T-SQL?

user219454
  • 81
  • 1
  • 8