2 Ways To Write IF THEN ELSE In SQL SELECT Query In SQL ...
In SQL server, To write if then else in SQL select query we can use. SELECT CASE statement (In all versions of SQL server) SELECT IIF logical function (From SQL server 2012 ) We will take an example Employee table which has columns EmpId, EmpName, Experience, Salary, Gender. Now we want to divide employees based upon their experience and salary.
DA: 44 PA: 22 MOZ Rank: 31