Simple SQL vs. Dialects

DBMS vendors use the functions of SQL dialects to differentiate their product, while at the same time claiming to support SQL standards. "Nuff said that.

Is there any SQL example that you encoded that cannot be converted to SQL: standard SQL SQL?

To be specific, I'm talking about DML (query statement), NOT DDL, stored procedure syntax, or anything that is not a pure SQL statement.

I also talk about queries that you will use in Production, and not for special materials.

Edit Jan 13

Thank you for all your answers: they conveyed the impression to me that most of the DBMS-specific SQL is created to provide working conditions for poor relational design. This leads me to the conclusion that you probably will not want to port most of the existing applications.

+3
source share
5 answers

(, Oracle NULL SQL- ), , , , . , , .

ANSI SQL , . , , , - , .

, - , . , , , , , . , .

, "" SQL- . , , , .

ANSI SQL, ; O/R mapper, . , , .

sprocs . sprocs ADO.net.

. , . "" .

+3

Oracle , , , , SQL

+3

Oracle , - ANSI SQL 1992. SQL Server SQL 1999, , "", . ( , "OVER" .)

Oracle SQL. SQL Server .

SQL Server "" : " 1 SALES_TOTAL". Oracle "SELECT * FROM (SELECT CUSTOMERS ORDER BY SALES_TOTAL) WHERE ROW_NUMBER <= 1".

, , Oracle SELECT () FROM DUAL.

:

, , . LINQ-to-SQL, 41 50 . "OVER":

SELECT [t1].[CustomerID], [t1].[CompanyName], [t1].[ContactName], [t1].[ContactTitle], [t1].[Address], [t1].[City], [t1].[Region], [t1].[PostalCode], [t1].[Country], [t1].[Phone], [t1].[Fax]
    FROM (
        SELECT ROW_NUMBER() OVER (ORDER BY [t0].[ContactName]) AS [ROW_NUMBER], [t0].[CustomerID], [t0].[CompanyName], [t0].[ContactName], [t0].[ContactTitle], [t0].[Address], [t0].[City], [t0].[Region], [t0].[PostalCode], [t0].[Country], [t0].[Phone], [t0].[Fax]
        FROM [dbo].[Customers] AS [t0]
        ) AS [t1]
    WHERE [t1].[ROW_NUMBER] BETWEEN 40 + 1 AND 40 + 10
    ORDER BY [t1].[ROW_NUMBER]
+1

SQL: 2008 - , . REGEXP, , SQL: 2008 LIKE_REGEX vs MySQL REGEXP.

, , .

+1

SO

:

ISNULL COALESCE SQL Server - /

+1

Source: https://habr.com/ru/post/1727766/


All Articles