Prateek Diwakar
Swap two string or integer values in SQL
By Prateek Diwakar in .NET on Feb 25 2017
  • Prateek Diwakar
    Feb, 2017 25

    --For String Declare @F Varchar(20) = 'F' , @S Varchar(20) = 'S'Set @F = CONCAT(@F, @S)Set @S = REPLACE(@F,@S,'') Set @F = REPLACE(@F,@S,'') PRINT(@S) PRINT(@F)--For IntegerDeclare @o int =1 Declare @t int =2Set @o = (@o + @t) Set @t = @o - @t Set @o = @o - @t PRINT(@O) PRINT(@T)

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS