SQL Functions in Azure

  • I am not familiar with Azure, hence my question below might sound cretinoid.
    We use SQL Server 2014 and our company has made a decision to move to Azure within 6 months. I tend to write my code without adding schema and let customer's DBA's to deal with it.
    But when it comes to functions, they must have schema, e.g. 

    DECLARE @v_xml XML

    SELECT @v_xml = dbo.MyFunction (set of params)
     

    Will it work on Azure or perhaps we shall take some steps already, whilst developing our SQL code, please?

    Much appreciated.

  • Schema qualifying in your t-sql code is a best practice. I recommend getting into the the habit of specifying the schema in all your SQL.

  • 100% agreement with Joe. You should be following best practices and writing the code correctly including object ownership. However, Azure SQL Database is SQL Server. If you have a valid (if poorly written) T-SQL statement that works in SQL Sever 2014, it'll work in Azure SQL Database.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Grant Fritchey - Friday, December 14, 2018 1:43 AM

    100% agreement with Joe. You should be following best practices and writing the code correctly including object ownership. However, Azure SQL Database is SQL Server. If you have a valid (if poorly written) T-SQL statement that works in SQL Sever 2014, it'll work in Azure SQL Database.

    I could agree with you if I was in a position to force / dictate the ownership to the customers.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply