How to set a return sql result to variable

Hello I have a sql query and this return one column with one value and i want to assign this to a variable any way how to assign it. Reason assign value is failing to me.

Select Top(1) [Id]
From [Test] Where Name=@XXX And DOB=@DOB

@Arvind_Kumar1

Use Execute Query activity there you have a option to store the result to a datable

For Connecting to SQL server from UiPath, check below documentation

Hope this may help you

Thanks