SELECT StudentNo,
Lastname,
Firstname,
Middlename,
Section,
OrgFee,
Subject,
Subject1,
Subject2,
Subject3,
Subject4,
Subject5
FROM Enroll
WHERE Subject or Subject1LIKE '" + subj.getText() + "%'"
答案 0 :(得分:-1)
我认为这可能对你有所帮助。
SELECT StudentNo, Lastname, Firstname, Middlename, Section, OrgFee,
Subject, Subject1, Subject2, Subject3, Subject4, Subject5
FROM Enroll
WHERE Subject or Subject1 LIKE '"%" + subj.getText() + "%"'
您需要在%
之前和之后添加subj.getText()
符号,并且在subject1