none
How do I fix this problem

    Question

  • create procedure ttt
    @degree nvarchar(50)
    as
    select price=SUM(price),fname from stdsalary
    select * from stdsalary
    where degree=@degree

     -----------------------------

    Msg 8120, Level 16, State 1, Procedure ttt, Line 4
    Column 'stdsalary.fname' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.

    Friday, June 28, 2013 5:28 PM

Answers

All replies