This repository contains SQL script from the book Microsoft SQL Server (TSQL2012) converted from SQL Server (T-SQL) syntax to PostgreSQL.
The goal is to make the original educational examples executable and testable in PostgreSQL environments.
The book T-SQL Fundamentals (2012) by Itzik Ben-Gan provides a comprehensive introduction to Transact-SQL using Microsoft SQL Server.
This project contains a PostgreSQL-compatible port of those example scripts.
During the conversion process:
- SQL Server-specific statements like
IDENTITY,TOP, andGOwere replaced with PostgreSQL equivalents (SERIAL,LIMIT,;). - System functions such as
GETDATE()were replaced withCURRENT_TIMESTAMP. - SQL Server data types were mapped to PostgreSQL-compatible types.
- Optional schema
"TSQL2012"is used to preserve logical structure.