格式此查詢確定,在調試時我看到價值更新,但只有告訴我這個消息{"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