We are providing online training of realtime Live project on Asp.Net MVC with Angular and Web API. For more information click here. If you have any query then drop the messase in CONTACT FORM

Friday, August 14, 2015

create table Employee
(
FirstName varchar(50),
LastName varchar(50),
salary money,
comm float,
AnualSal money,
TotalSalary money
)

drop table Employee
insert into Employee(FirstName,LastName,salary,comm)values('mithilesh','kumar',8000,0.5)
insert into Employee(FirstName,LastName,salary,comm)values('rakesh','kumar',5000,0.7)
insert into Employee(FirstName,LastName,salary,comm)values('mithilesh','kumar',9000,0.9)
insert into Employee(FirstName,LastName,salary)values('rohit','kumar',1100)
insert into Employee(FirstName,LastName,salary)values('sahil','kumar',13000)

select * from Employee
select FirstName,AnualalSalary=(salary*12)*ISNULL(comm,1),totalsalary=(salary*12)+ISNULL(comm,0) from Employee



Output:



No comments: