Why does SQL Server not support to insert/update? It only supports select.
Is there any alternative for In Duplicate Key of MySQL in SQL Server?
Please help..!
IF(SELECT accountNo 
   FROM MeterReading 
   WHERE accountNo = 1111) is NULL 
    (INSERT INTO dbo.MeterReading  
     VALUES (1, 1, 1, 1)); 
ELSE 
    (UPDATE dbo.MeterReading 
     SET currentReading = 1223 
     WHERE accountNo = 1111);
 
     
     
     
    