开发者

Error in concatenation expression

Just a beginner, but can't figure out the reason for my error. Trying to create the 'email' field with the following query:

SET Students.Email = FirstName + "." + LastName + "@mycollege.edu"

but get the following error:

Msg 102, Lev开发者_StackOverflowel 15, State 1, Line 1 Incorrect syntax near '.'.


Like this:

UPDATE Students SET Email = FirstName + '.' + LastName + '@mycollege.edu'

But I'd suggest you read up on SQL Server and how to use SQL - this is an extremely basic question and I'm sure Google or Bing have some answers for you.


I believe you want to UPDATE the table:

UPDATE Students
SET Email = FirstName + "." + LastName + "@mycollege.edu"
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜