i've got a question about which query is better with higher performance in sql
SELECT
1st comparison:
Declare @Variable VARCHAR(MAX)<BR>
SELECT top 1 @VARIABLE = COLUMN2 FROM TABLE WHERE COLUMN1 like 'Any value'
2nd comparison:
Declare @Variable varchar(MAX)
select top 1 @variable = t.column2 from table t where t.column1 like 'any value'
update
1st comparison:UPDATE T set column2 = 'any value' from table T where column1 = 'any value'
2nd comparison:
UPDATE TABLE SET COLUMN2 = 'any value' where column 1 = 'any value'
delete
1st comparison:
delete t
from table t
where column1 = 'any value'
2nd comparison
delete from table where column1 = 'any value'
I just need your opinion on which query is better, and if there is a better way to optimize my queries performance, can someone tell me how is it?