SQL Stored Procedure in Databricks

ashishasr
New Contributor II

Hello, Is there a sql server equivalent stored procedure in Databricks which supports while loop along with delay as below. or are there any other alternative to achieve the same.

while (select count(*) from schema.mart_daily with (nolock)) = 0
begin
    waitfor delay '00:01'
end

 Thank You in advance.