我是 SQL 新手,目前遇到我的 sql 标题中所述的错误。
这是我的 SQL 查询:
SELECT APPLICANT.APPNUM,APPLICANT.APPNAME,COUNT(APPLICATION.APPCNAPPNUM) AS "Total No. of Positions Applied"
FROM APPLICANT,APPLICATION
WHERE APPLICANT.APPNUM = APPLICATION.APPCNAPPNUM;
这是创建语句:
CREATE TABLE APPLICANT (
appNum varchar2(10) not null,
appName varchar2(70),
appDOB date,
appCity varchar2(70),
appStreet varchar2(70),
appHouseNum varchar2(10),
constraint applicant_Pkey primary key (appNum)
);
CREATE TABLE APPLICATION (
appcnPosNum varchar2(10) not null,
appcnPosStOffrDt date not null,
appcnAppNum varchar2(10) not null,
appcnDt date,
constraint application_Pkey primary key (appcnPosNum, appcnPosStOffrDt, appcnAppNum),
constraint application_Fkey1 foreign key (appcnPosNum, appcnPosStOffrDt) references
POSITION(posNum, posStartOfferDt),
constraint application_Fkey2 foreign key (appcnAppNum) references APPLICANT(appNum)
);
有人可以给我任何有关如何解决此错误的建议吗?