我现在的问题是关于如何在 SQL 中使用“不等于”。这是我的代码:
Dim cmd As New SqlClient.SqlCommand
With cmd
.CommandText = "SELECT [Position],[Partylist],[Fullname],[Lvl],[Votes] FROM tbl_cands WHERE [Department] = '" & elem & "'AND [PositionID]=" & pres & ""
.CommandType = CommandType.Text
.CommandTimeout = 30
.Connection = conn
End With
Dim dt As New DataTable
dt.Load(cmd.ExecuteReader)
我不需要显示不等于 None 的全名。