Ms sql vs my sql

Tea Peet 40 Reputation points
2023-10-31T08:44:42.93+00:00

Ms sql and my sql both use transact sql language, what's the biggest difference between them?

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,361 questions
Transact-SQL
Transact-SQL
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
4,601 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Erland Sommarskog 107.2K Reputation points
    2023-10-31T22:56:44.8633333+00:00

    MySQL using Transact-SQL? I didn't know that. Transact-SQL is an SQL dialect that origins from Sybase, and also used my Microsoft SQL Server, since SQL Server originates from Sybase. MySQL has a completely different background, and I would expect that there are plenty of differences between the two.

    For instance, I believe semicolons to terminate statements is mandatory in MySQL, but this is not the case in MySQL. MySQL seems favour backticks to quote identifiers whereas SQL Server prefers brackets. And so on.

    0 comments No comments

  2. way0utwest 81 Reputation points MVP
    2023-12-21T17:34:52.04+00:00

    AFAIK, MySQL doesn't name it's implementation of the SQL Language. SQL Servers uses Transact-SQL or T-SQL.

    My SQL has different syntax elements than SQL Server. Their DDL: https://dev.mysql.com/doc/refman/8.2/en/sql-data-definition-statements.html and DML: https://dev.mysql.com/doc/refman/8.2/en/sql-data-manipulation-statements.html

    There are different functions, like for length, LEN (T-SQL) and CHARACTER_LENGTH (MySQL), and as Erland noted, semicolons are needed. T-SQL uses GO (configurable) as a batch delimeter in most tools whereas MySQL just uses the semicolon

    0 comments No comments

  3. Bruce (SqlWork.com) 61,731 Reputation points
    2023-12-23T17:17:39.9466667+00:00

    Besides details of function names, and control flow statement names, the big difference is sql server allows flow control statements in a sql batch while MySQL only allows in a stored procedure function definition.

    0 comments No comments