. Dec 1, 2018 · Works in: SQL Server (starting with 2012), Azure SQL Database More Examples Example Format a number: SELECT FORMAT (123456789, '##-##-#####'); Try it Yourself » Previous SQL Server Functions Next W3Schools offers free online tutorials, references and exercises in all the major languages of the web.