shwetaatul
Starting Member
5 Posts |
Posted - 2012-03-30 : 04:31:15
|
I have a table
create table student_Records1 (ID int not null primary key, Name nvarchar(64),Maths int,Physics int,Total int) And i inserted the below record in the table. insert into student_Records1 values (1,'atul','','',''),(2,'rohit','','',''),(3,'manvendra','','',''),(4,'Vishal','','','') Now, I created a below function and i want to insert the value of blank columns in the table through the function. Please help me in this. CREATE FUNCTION Addition5() RETURNS Decimal(6,2) BEGIN DECLARE @Total Int, @Maths Int, @Physics Int Set @Maths=20 set @Physics=40 SET @Total = @Maths + @Physics insert into Student_record1 RETURN @Total END; GO
Atul bhardwaj |
|