0
Select語句僅返回非空的技術名稱。由於技術人員尚未被分配到打開門票,我需要這個返回所有產品代碼,不管技術名稱是否填寫或爲空。C#中的SELECT語句如果爲空(Visual Studio)
string selectStatement =
"SELECT ProductCode, DateOpened, Customers.Name AS CustName, " +
"Technicians.Name as TechName, Title, DateClosed " +
"FROM Incidents " +
"JOIN Customers ON Incidents.CustomerID = Customers.CustomerID " +
"JOIN Technicians ON Incidents.TechID = Technicians.TechID " +
"WHERE DateClosed IS NULL " +
"ORDER BY DateOpened";
[加入的可視化表示](https://www.codeproject.com/Articles/33052/Visual-Representation-of-SQL-Joins) –
如果您使用'JOIN',實際上使用'INNER JOIN' –