To call a function, SQL Server uses the following syntax:
SELECT dbo.GetSquare(Item) AS SquareValue
FROM Squares;
In Oracle the same can be achieved with:
SELECT GetSquare(Item) AS SquareValue
FROM Squares;
The syntax is almost the same, except SQL Server requires the schema (dbo.
) before the function name.
Is it possible to write an identical statement to call a function for both DBMS in 2024?