In SQL we can use DECLARE to initialise a value
DECLARE @StartDate DATETIME = '01/01/2013'
DECLARE @EndDate DATETIME = '01/01/2015'
As DATABRICKS SQL doesn't support DECLARE how can we write the same code in DATABRICKS sql?
In SQL we can use DECLARE to initialise a value
DECLARE @StartDate DATETIME = '01/01/2013'
DECLARE @EndDate DATETIME = '01/01/2015'
As DATABRICKS SQL doesn't support DECLARE how can we write the same code in DATABRICKS sql?
Based on the discussion here, there is no support for TSQL style declarations in databricks SQL.
May be for your situation you may need to handle those variables in your client code or in middle layers.
Datanricks SQL doesn't support TSQL, if needed you can make use of parameters in your query
https://docs.databricks.com/sql/user/queries/query-parameters.html