Back to all posts

What difference between between MySQL and MSSQL

Feature MySQL MSSQL Ownership Oracle Corporation Microsoft Licensing Open-source (GPL) and commercial versions Commercial with free Express Edition Operati…

FeatureMySQLMSSQL
OwnershipOracle CorporationMicrosoft
LicensingOpen-source (GPL) and commercial versionsCommercial with free Express Edition
Operating System SupportWindows, Linux, macOS, UnixPrimarily Windows, supports Linux (from 2017)
SQL SyntaxStandard SQL with MySQL-specific extensionsT-SQL (Transact-SQL)
Case SensitivityCase-insensitive on Windows, case-sensitive on LinuxCase-insensitive by default
Storage EnginesSupports multiple engines (InnoDB, MyISAM, etc.)Unified storage model
Transactions & ACID ComplianceInnoDB engine provides ACID complianceFull ACID compliance natively
PerformanceBetter for read-heavy workloadsSuitable for both read and write-heavy operations
Data TypesLimited data types (JSON supported in later versions)Wider range (includes JSON, XML, spatial data types)
Backup & RecoveryBackup through database dumps, slower recoveryAdvanced options, point-in-time recovery
Replication & ClusteringMaster-slave and master-master replicationAlways On Availability Groups, clustering, replication
Community & SupportLarge open-source communityEnterprise support from Microsoft
CostFree (open-source) with commercial optionsPaid, with free Express Edition
IntegrationModerate integration with Microsoft productsSeamless integration with Microsoft ecosystem

LIMIT Clause: The LIMIT clause is used to specify the number of records to return.

SQL
SELECT * FROM Customers
LIMIT 3;

--The SQL query below says "return only 3 records, start on record 4 (OFFSET 3)":
SELECT * FROM Customers LIMIT 3 OFFSET 3;

--Same work in MSSQL:
SELECT * FROM Customers Order by 1 
OFFSET 3 ROWS
FETCH NEXT 3 ROW ONLY;

Store Procedure:

# Temp changing delimiter $$
DELIMITER $$
CREATE PROCEDURE `GetCountry`(IN region varchar(50))
BEGIN
Select * from country where country.region = region;
END$$

# Again changing delimiter
DELIMITER ;

Keep building your data skillset

Explore more SQL, Python, analytics, and engineering tutorials.