格式此查询确定,在调试时我看到价值更新,但只有告诉我这个消息{"Invalid column name 'Mohannad' "}
,请帮我家伙无效列名“*******”
UPDATE Employee
SET Name =Mohannad
, Age=22
, GenderID =1
, CountryID=1
, Mobile=8765
FROM Employee
INNER JOIN Country ON Employee.CountryID = Country.CountryID
INNER JOIN Gender ON Employee.GenderID = Gender.GenderID
WHERE EmployeeID=1 ;
SELECT Employee.EmployeeID, Employee.Name, Employee.Age, Employee.GenderID, Gender.GenderName, Employee.CountryID, Country.CountryName, Employee.Mobile
FROM Employee
INNER JOIN Country ON Employee.CountryID = Country.CountryID
INNER JOIN Gender ON Employee.GenderID = Gender.GenderID
顺便问一下试试 - 你是如何产生这个命令?如果你使用了带参数的命令,你可以避免这种混乱,并且有更安全的代码:http://en.wikipedia.org/wiki/SQL_injection – Kobi 2012-07-05 19:41:20