我用Oracle查询语句建表 一直报ORA-00907错误缺失右括号

给出这一段,有无大佬能指导一下哪里错了
CREATE TABLE t_Order ( id int(11) NOT NULL auto_increment, createtime datetime default NULL, jiazong varchar(255) default NULL, orderid varchar(255) default NULL, phone varchar(255) default NULL, truename varchar(255) default NULL, zhuangtai varchar(255) default NULL, userid int(11) default NULL, zuoweiid int(11) default NULL, PRIMARY KEY ( id ), KEY FK9EFDD3A3774E5A41 ( zuoweiid ), KEY FK9EFDD3A32EDD2249 ( userid ), CONSTRAINT FK9EFDD3A32EDD2249 FOREIGN KEY ( userid ) REFERENCES t_user ( id ), CONSTRAINT FK9EFDD3A3774E5A41 FOREIGN KEY ( zuoweiid ) REFERENCES t_zuowei ( id )) ENGINE=InnoDB DEFAULT CHARSET=utf8;

2个回答

是不是外键userid,zuoweiid对应表中的类型和t_Order 不一致?

ENGINE=InnoDB 这是mysql 建表语句把

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
ORA-00907:缺失右括号
CREATE TABLE WEB_CULTURE(rnCULTURE_ID NUMBER(10),rnCULTURE_TITLE VARCHAR2(500),rnCULTURE_TYPE NUMBER(10),rnCULTURE_DATE DATE(7),rnDEPT VARCHAR2(100),rnCULTURE_CONTENT BLOB,rnCULIMG_URL VARCHAR2(256),rnCUL_TITLE VARCHAR2(128),rnCONSTRAINT WEB_CULTURE PRIMARY KEY (CULTURE_ID)rn);rn这段建表语句报 ORA-00907:缺失右括号
ORA-00907: 缺失右括号
Oracle版半天沒有人,很著急,所以來熟悉的C++版rnrn代码是按照书本上来的.......求前辈指点。rnrnSQL> CREATE TABLE XS_KCrn 2 (rn 3 XH CHAR(6) NOT NULL ,rn 4 KCH CHAR(6) NOT NULL ,rn 5 CJ NUMBER(2) NULL,rn 6 XF NUMBER(2) NULL,rn 7 CONSTRAINT "PK_XS_KC" PRIMARY KEY("XH", "KCH")rn 8 TABLESPACE MYTS rn 9 ) ;rn TABLESPACE MYTSrn *rn第 8 行出现错误:rnORA-00907: 缺失右括号
ORA-00907 缺失右括号
SELECTrnxmlid.nextval,rn''rnrnrnrnFROM user_tab_columns t WHERE t.TABLE_NAME=vtab;rnrn变量是前面存过定义好的。 rn
ora-00907: 缺失右括号
在pl/sql里执行  报此错rnselect TEMQ_1f040dd124f08b2ce1.GW GW,rn TEMQ_1f040dd124f08b2cb2.GZRQ GZRQ,rn TEMQ_1f040dd124f08b2bd8.DH DH,rn TEMQ_1f040dd124f08b2bd8.XKHSM XKHSM,rn TEMQ_1f040dd124f08b2c83.KHZS KHZS,rn TEMQ_1f040dd124f08b2c83.KHZS - TEMQ_1f040dd124f08b2bd8.XKHSM LKHZS,rn TEMQ_1f040dd124f08b2cb2.LDZS LDZS,rn TEMQ_1f040dd124f08b2cb2.QDZS QDZS,rn TEMQ_1f040dd124f08b2cb2.QFZS QFZS,rn TEMQ_1f040dd124f08b2d20.QYTS QYTS,rn TEMQ_1f040dd124f08b2d20.MJ MJ,rn TEMQ_1f040dd124f08b2d20.JE JE,rn TEMQ_1f040dd124f08b2d20.YSJE YSJE,rn TEMQ_1f040dd124f08b2d20.QKJE QKJE,rn sum(TEMQ_1f040dd124f08b2cb2.LFZS) LFZSrn from TEMQ_1f040dd124f08b2cb2,rn TEMQ_1f040dd124f08b2bd8,rn TEMQ_1f040dd124f08b2c83,rn TEMQ_1f040dd124f08b2d20,rn TEMQ_1f040dd124f08b2ce1rn where TEMQ_1f040dd124f08b2cb2.GZRQ = TEMQ_1f040dd124f08b2bd8.DJRQrn and TEMQ_1f040dd124f08b2cb2.GZRQ = TEMQ_1f040dd124f08b2c83.GZRQrn and TEMQ_1f040dd124f08b2cb2.GZRQ = TEMQ_1f040dd124f08b2d20.QYRQrn and TEMQ_1f040dd124f08b2cb2.PK_PSNDOC =rn TEMQ_1f040dd124f08b2ce1.PK_PSNDOCrn and ((TEMQ_1f040dd124f08b2ce1.PK_CORP = '1008') andrn (TEMQ_1f040dd124f08b2bd8.PK_PSNDOC = '0001G510000000001X90') andrn (TEMQ_1f040dd124f08b2c83.PK_PSNDOC = '0001G510000000001X90') andrn (TEMQ_1f040dd124f08b2cb2.PK_PSNDOC = '0001G510000000001X90') andrn (TEMQ_1f040dd124f08b2d20.PK_PSNDOC = '0001G510000000001X90') andrn (TEMQ_1f040dd124f08b2ce1.PK_PSNDOC = '0001G510000000001X90') andrn (TEMQ_1f040dd124f08b2bd8.PK_PROJECT = '0001G510000000000E8S') andrn (TEMQ_1f040dd124f08b2c83.PK_PROJECT = '0001G510000000000E8S') andrn (TEMQ_1f040dd124f08b2cb2.PK_PROJECT = '0001G510000000000E8S') andrn (TEMQ_1f040dd124f08b2d20.PK_PROJECT = '0001G510000000000E8S') andrn (TEMQ_1f040dd124f08b2ce1.PK_PROJECT = '0001G510000000000E8S') andrn (TEMQ_1f040dd124f08b2cb2.GZRQ >= 'select trunc(next_day(to_date('rn 2009 - 10 - 30 ', ' yyyy - mm - dd '), 1) - 6) from dual') andrn (TEMQ_1f040dd124f08b2cb2.GZRQ <= 'select trunc(next_day(to_date('rn 2009 - 10 - 30 ', ' yyyy - mm - dd '), 1) ) from dual'))rn group by TEMQ_1f040dd124f08b2ce1.GW,rn TEMQ_1f040dd124f08b2cb2.GZRQ,rn TEMQ_1f040dd124f08b2bd8.DH,rn TEMQ_1f040dd124f08b2bd8.XKHSM,rn TEMQ_1f040dd124f08b2c83.KHZS,rn TEMQ_1f040dd124f08b2c83.KHZS - TEMQ_1f040dd124f08b2bd8.XKHSM,rn TEMQ_1f040dd124f08b2cb2.LDZS,rn TEMQ_1f040dd124f08b2cb2.QDZS,rn TEMQ_1f040dd124f08b2cb2.QFZS,rn TEMQ_1f040dd124f08b2d20.QYTS,rn TEMQ_1f040dd124f08b2d20.MJ,rn TEMQ_1f040dd124f08b2d20.JE,rn TEMQ_1f040dd124f08b2d20.YSJE,rn TEMQ_1f040dd124f08b2d20.QKJErn请赐教
oracle查询语句老是报ORA-00907缺失右括号
--大家好,我有一条oracle查询语句老是报ORA-00907缺失右括号的错误,能不能帮我看一下,谢谢:rn--统计毕业班等级考试最佳成绩rnselect distinct e.xy 学院,rn e.xzb 班级,rn e.xh 学号,rn e.xm 姓名,rn a.cet3 英语三级,rn b.cet4 英语四级,rn c.cet6 英语六级,rn d.computer 计算机rn from ((select xh, xm, djksmc, max(cj) cet3rn from xsdjksbrn where djksmc = '英语三级'rn Group by xh, xm, djksmc) a,rn (select xh, xm, djksmc, max(cj) cet4rn from xsdjksbrn where djksmc = '英语四级'rn Group by xh, xm, djksmc) b,rn (select xh, xm, djksmc, max(cj) cet6rn from xsdjksbrn where djksmc = '英语六级'rn Group by xh, xm, djksmc) c,rn (select xh, xm, djksmc, max(cj) computerrn from xsdjksbrn where djksmc like '计算机%'rn Group by xh, xm, djksmc) d, xsjbxxb e)rn where (a.xh = e.xh or b.xh = e.xh or c.xh = e.xh or d.xh = e.xh)rn and ((e.DQSZJ = '2010' AND e.XZ = '5') ORrn (e.DQSZJ = '2011' AND e.XZ = '4') ORrn (e.DQSZJ = '2012' AND e.XZ = '3'))rn AND e.SFZX = '是'rn order by e.xy, e.xzb, e.xh, e.xm;rnrnrn报错落在 djksmc) a,的a上rnrn我确信我的语句所有的左右括号都是匹配的,没有缺失,一定是语句的语法出了问题,请大家帮我把把关,谢谢!
ora-00907 缺失右括号?????
SELECT /*+ parallel (statcmain )*/ rn sum(decode(statcmain.certitype,''P'', 1,decode(statcmain.endortype, ''19'', ''-1'', 0))) as Count, rn sum((STATCMAIN.CHGPREMIUM - STATCMAIN.CHGMIDDLECOST) * STATCMAIN.CNYEXCHRATE * STATCMAIN.COINSRATE / 100) as premium, rn sum(STATCMAIN.CHGINSURED * STATCMAIN.CNYEXCHRATE * STATCMAIN.COINSRATE / 100) as amount, rn sum(STATCMAIN.CHGLIMIT * STATCMAIN.CNYEXCHRATE * STATCMAIN.COINSRATE / 100) as limit rn FROM rep.Statcmain, rn reptest.statcogsharerate, rn rep.statdcompanylevel rn where Statcmain.Policyno = statcogsharerate.policyno(+) rn and statcmain.comcode = statdcompanylevel.comcode rn and statcmain.riskcode NOT IN (''YAB0'', ''2797'', ''2798'') rn AND STATCMAIN.CLASSCODE <> ''30'' rn group by statcmain.statdate, rn statcmain.StartDate, rn statcmain.COMCODE, rn decode(statcmain.riskcode, rn ''2700'', rn statcmain.productcode, rn statcmain.riskcode), rn statcmain.SHAREHOLDERFLAG, rn statcmain.BUSINESSNATURE, rn ((substr(statcmain.othflag, 1, 1))), rn statdcompanylevel.centercode, rn statcmain.Agentcode, rn statcmain.Handler1code, rn decode(substr(statcmain.othflag, 15, 1), rn NULL, rn ''0'', rn substr(statcmain.othflag, 15, 1)), rn statcmain.BusinessKind, rn statcmain.BusinessClass, rn CASE WHEN (statcmain.businessflag IS NULL OR statcmain.businessflag <> ''1'') THEN (''0'') rn ELSE (''1'') END, rn statcmain.businesssource, rn statcmain.constructtype,rn statcmain.channeltype,rn statcmain.servicearea,rn statcmain.agriFlag,rn statcmain.usenaturecode,rn statcmain.carkindcode,rn statcmain.toncount,rn statcmain.applitype,rn statcmain.ventureflag, rn statcmain.grouppurchaseflag;rn
oracle 建表缺失右括号
CREATE TABLE BSI_AREA(rn ADCODE VARCHAR(20) NOT NULL,rn AREANAME VARCHAR(100),rn AREAPOLYSTR CLOB(1048576),rn AREACENTERLON DECIMAL(19,15),rn AREACENTERLAT DECIMAL(19,15),rn CITY_ID VARCHAR(20),rn PARENTID VARCHAR(12),rn CONSTRAINT PK_BSI_AREA PRIMARY KEY(ADCODE));rnrn以上是语句,建好了很多表都是这么写的,这个表就说啥都报错,SQL 错误: ORA-00907: 缺失右括号。rn自己尝试给表里的列分别删了就留一列还是不好用,无法定位问题原因,水平比较低,肯定各位大神走过路过帮忙看看。
ORA-00907: 缺失右括号问题!!!???
今天遇到了数据库建表时的问题:ORA-00907: 缺失右括号问题!!!???rnrnrn我的SQL脚本如下:rnrncreate table sys_managers(ID bigint NOT NULL PRIMARY KEY,rnname varchar(28) NOT NULL,rnsex varchar(4) NOT NULL,rnage int(3) NOT NULL,rnaddress varchar(100) NOT NULL,rnpassword varchar(18) NOT NULL,rnrole varchar(28) NOT NULL,rnflag varchar(6) NOT NULL,rnflag2 varchar(6) default null,rndegree varchar(8) not null,rnpositional_title varchar(18) default null,rndate1 date not null,rndate2 date default null,rnflag3 varchar default null,rnself TEXT default null)ENGINE=InnoDB DEFAULT CHARSET=gb2312;rnrn若在MySQL中,会出现如附图片的报错信息。rn请教各位大神该如何修改,解决问题啊?rnrnrn
java.sql.SQLException: ORA-00907: 缺失右括号
String sqlTablespace = "select upper(f.tablespace_name) \"Tablespace\",d.tot_grootte_mb \"Size MB\",f.total_bytes \"Free MB\","rn + "to_char(round(f.total_bytes/ d.tot_grootte_mb * 100,2),'990.99') \"Percent Free\","rn + "d.autoextensible from (select tablespace_name,round(sum(bytes) /(1024 * 1024), 2) total_bytes,round(max(bytes) / (1024 * 1024),"rn + " 2) max_bytes from sys.dba_free_space group by tablespace_name) f,"rn + "(select dd.tablespace_name,round(sum(dd.bytes)/(1024 * 1024), 2) tot_grootte_mb,"rn + "round(sum(dd.maxbytes)/(1024 * 1024), 2) tot_tbs_mb,dd.autoextensible from sys.dba_data_files dd"rn + "group by dd.tablespace_name,dd.autoextensible) d"rn + " where d.tablespace_name = f.tablespace_name order by f.tablespace_name";
java.sql.SQLSyntaxErrorException: ORA-00907: 缺失右括号
select * from ( nnselect a.*, ROWNUM rnum from ( nnselect * from SHOP_ORDER nWHERE start_date between to_date(‘2016-08-22 11:34:36’,'yyyy/mm/dd hh24:mi:ss') nand close_date between to_date('2016-09-22 11:34:36','yyyy/mm/dd hh24:mi:ss') ) a where ROWNUM< ?) where rnum >= ?nnnn求各位大神大牛帮帮小弟!!!!
SQLSyntaxErrorException: ORA-00907: 缺失右括号
select * from ( select a.*, ROWNUM rnum from ( select site_code,shop_order,target_qty,start_date,close_date,sales_order,customer_code,item_code,status ,remark,create_by,create_time,update_by,update_time from SHOP_ORDER WHERE shop_order = ? and start_date between to_date(?,'yyyy/mm/dd hh24:mi:ss') and close_date between to_date(?,'yyyy/mm/dd hh24:mi:ss') and status = ? ) a where ROWNUM < ?) where rnum >= ?nnn大神大牛帮帮忙。
ORA-00907: 缺失右括号 问题!!!???
rnrn creat table xh_projectrn(rn pk_project int(4),rn project_code varchar(20),rn project_name varchar(60),rn iflock varchar(1) not null,rn ifmerge varchar(1) not null,rn ts char(19) convert(char(19),getdate(),20),rn dr smallint(2) default 0,rn constraint P_pk_xh_project primary key (pk_project)rn);rnrn 报错提示: ORA-00907:缺失右括号 rn 请各位帮忙!rn 数据库使用的是 oracle数据库。rn rn 同样的语句 下面的创建表就可以执行:rncreate table wa_qx_parameterrn(rn pk_parameter CHAR(20) not null,rn param_code VARCHAR(20) not null,rn param_name VARCHAR(100) not null,rn param_value VARCHAR(20) not null,rn approveflag SMALLINT default 0,rn mender VARCHAR(20),rn assessor VARCHAR(20),rn amend_date CHAR(19),rn remark VARCHAR(500),rn ts CHAR(19),rn dr SMALLINT default 0,rn constraint P_pk_wa_qx_paramet primary key (pk_parameter)rn); rn
在oracle中建表出现ORA-00907: 缺少右括号错误,
SQL> create table yangou(rn 2 id int(32) not null primary key,rn 3 name varchar(30) not null);rnrnid int(32) not null primary key,rn *rnERROR 位于第 2 行:rnORA-00907: 缺少右括号rn这是我的建表代码,刚学oracle,请大家帮忙,谢谢rncreate table yangou(rn 2 id varchar(32) not null primary key,rn 3 name varchar(30) not null);如果是这样的,就没有错误.rnrn
数据库建表的问题 ORA-00907: 缺失右括号问题!!!???
报错:ORA-00907: 缺失右括号问题!!!???rnrn我的建表脚本如下所示:rnrncreate table sys_managers(ID bigint NOT NULL PRIMARY KEY,rnname varchar(28) NOT NULL,rnsex varchar(4) NOT NULL,rnage int(3) NOT NULL,rnaddress varchar(100) NOT NULL,rnpassword varchar(18) NOT NULL,rnrole varchar(28) NOT NULL,rnflag varchar(6) NOT NULL,rnflag2 varchar(6) default null,rndegree varchar(8) not null,rnpositional_title varchar(18) default null,rndate1 date not null,rndate2 date default null,rnflag3 varchar default null,rnself TEXT default null)ENGINE=InnoDB DEFAULT CHARSET=gb2312;rnrnrn请教各位这是什么错误啊,该如何修改捏?rnrn若在MySQL中会出现rn[img=https://img-bbs.csdn.net/upload/201309/17/1379424206_904450.jpg][/img]rn如图所示错误。rnrn请教各位这是什么错误啊,该如何修改捏?
ORA-00907: 缺失右括号问题整理解决
ORA-00907: 缺失右括号前言        最近在开发过程中使用oracle数据库,在程序中进行查询数据时遇到了“ORA-00907: 缺失右括号”的问题,但是如果直接把sql语句直接在数据库或PL/SQL中执行时,却又能够正常查询,为了解决这个问题,折腾了半天,查找了一些资料,所以就对各种导致出现“缺失右括号”的情况进行了整理总结。行文如下。1 union all中order by 导致
mybatis分页查询时ORA-00907: 缺失右括号
mybatis语句:rn[code=text]rnSELECT * FROMrn (SELECT rn id as id,rn appserialnumber as appserialnumber,rn who as who,rn createtime as createtime,rn operatedtype as operatedtype,rn operate as operate,rn operatedobject as operatedobject,rn description as description,rn result as result,rn ROWNUM AS row_numrn FROM server_log ROWNUM < (#startRecord+#total)) t_temprn WHERE t_temp.row_num >= #startRecordrn[/code]rnrn然后控制台打印语句:rn10:06:51,114 DEBUG Connection:27 - ooo Connection Openedrn10:06:51,442 DEBUG PreparedStatement:27 - ==> Executing: select count(*) from server_log rn10:06:51,442 DEBUG PreparedStatement:27 - ==> Executing: select count(*) from server_log rn10:06:51,442 DEBUG PreparedStatement:27 - ==> Parameters: rn10:06:51,442 DEBUG PreparedStatement:27 - ==> Parameters: rn10:06:51,630 DEBUG Connection:27 - ooo Connection Openedrn10:06:51,646 DEBUG PreparedStatement:27 - ==> Executing: SELECT * FROM (SELECT id as id, appserialnumber as appserialnumber, who as who, createtime as createtime, operatedtype as operatedtype, operate as operate, operatedobject as operatedobject, description as description, result as result, ROWNUM AS row_num FROM server_log ROWNUM < (?+?)) t_temp WHERE t_temp.row_num >= ? rn10:06:51,646 DEBUG PreparedStatement:27 - ==> Executing: SELECT * FROM (SELECT id as id, appserialnumber as appserialnumber, who as who, createtime as createtime, operatedtype as operatedtype, operate as operate, operatedobject as operatedobject, description as description, result as result, ROWNUM AS row_num FROM server_log ROWNUM < (?+?)) t_temp WHERE t_temp.row_num >= ? rn10:06:51,646 DEBUG PreparedStatement:27 - ==> Parameters: 0(Integer), 10(Integer), 0(Integer)rn10:06:51,646 DEBUG PreparedStatement:27 - ==> Parameters: 0(Integer), 10(Integer), 0(Integer)rn2014-8-1 10:06:51 org.apache.catalina.core.StandardWrapperValve invokern严重: Servlet.service() for servlet SearchServlet threw exceptionrnorg.apache.ibatis.exceptions.PersistenceException: rn### Error querying database. Cause: java.sql.SQLException: ORA-00907: 缺失右括号rnrn### The error may involve com.itrus.mylog.domain.ServerLog.selectAllServerLog-Inlinern### The error occurred while setting parametersrn### Cause: java.sql.SQLException: ORA-00907: 缺失右括号rnrn at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:8)rn at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:77)rn at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:69)rn at com.itrus.mylog.dao.impl.SearchDAOImpl.searchPagination(SearchDAOImpl.java:37)rn at com.itrus.mylog.service.impl.SearchServiceImpl.searchPagination(SearchServiceImpl.java:24)rn at com.itrus.mylog.servlet.SearchServlet.search(SearchServlet.java:53)rn at com.itrus.mylog.servlet.SearchServlet.service(SearchServlet.java:40)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)rn at java.lang.Thread.run(Thread.java:619)rnCaused by: java.sql.SQLException: ORA-00907: 缺失右括号rnrn at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)rn at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)rn at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)rn at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)rn at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:213)rn at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:796)rn at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1031)rn at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:836)rn at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1116)rn at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3285)rn at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3390)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:45)rn at $Proxy1.execute(Unknown Source)rn at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:39)rn at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:55)rn at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:41)rn at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:216)rn at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:95)rn at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:72)rn at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:75)rn ... 18 morernrn求指点,是语句哪里写错了么?
ORA-00907: 缺失右括号与左括号问题总结
在创建数据表总结如下:  1.date限定字段大小的时候,会报错,比如,将date(12)去掉(12);  2.关键字顺序有误,也会报这样的错;  3.创建表时,如果表有关键字,用双引号括起来;  4.如果创建表时,未对字段中的表设置长度,也会报错;  5.创建主外键约束时外键类型跟主键类型不完全一致,也是会报错的。  ...
oracle写了个简单的分页,一直报右括号缺失
存储过程-------rncreate or replace procedure proc8(v_in_table in varchar,v_in_pagesize in number,v_in_pagenow in number,v_out_result out pack2.my_cursor) isrn 2 v_begin number(10);rn 3 v_end number(10);rn 4 v_sql varchar2(3000);rn 5 beginrn 6 v_begin:=v_in_pagesize*(v_in_pagenow-1)+1;rn 7 v_end:=v_in_pagesize*v_in_pagenow;rn 8 v_sql:='select name into v_name from (select a1.*,rownum rn from (select * from '||v_in_table||') a1 where rownum<='||v_end||' where rn>'||v_begin;rn 9 open v_out_result for v_sql;rn 10 end;rn 11 /rn rnjava程序--------rn Class.forName("oracle.jdbc.driver.OracleDriver");rn rn ct=DriverManager.getConnection("jdbc:oracle:thin:@10.1.12.184:1521:orcl","system","manager");rn cs=ct.prepareCall("call proc8(?,?,?,?)");rn cs.setString(1, "student");rn cs.setInt(2,2);rn cs.setInt(3,1);rn cs.registerOutParameter(4,oracle.jdbc.OracleTypes.CURSOR);rn cs.execute();rn rs=(ResultSet)cs.getObject(4);rn while(rs.next())rn System.out.println("name="+rs.getString("name")+" no="+rs.getInt("no"));rn rnrn错误------rnjava.sql.SQLException: ORA-00907: 缺失右括号rnORA-06512: 在 "SYSTEM.PROC8", line 9rnORA-06512: 在 line 1
ORA-00907: 缺少右括号
[img]http://dl2.iteye.com/upload/attachment/0094/0197/219d7536-01cb-3617-8b6b-9454ad67bf83.jpg[/img] 在一个应用系统,提供了运行 ORQCLE SQL 的功能。对于简单的 SQL 语句的运行一切正常,而对于有子查询的复杂 SQL 语句,经常会出现错误。但是,这个语句在 DQL PLUS 中运行...
第 12 行出现错误: ORA-00907: 缺失右括号
create table T_RECV_MSG (rn DBID number(11) not null,rn STATUS number(11) default 0,rn SEQID varchar(20) default '',rn CALLNO varchar(20) default '',rn DSTCALLNO varchar(20) default '',rn SERVICEID varchar(20) default '',rn LINKID varchar(20) default '',rn SENDTIME date default sysdate,rn CONTENT varchar(4000) default '',rn OPERATOR varchar(20) default '',rn UDHI int(11) default -1, rn primary key (DBID)rn);rnUDHI int(11) default -1,rn *rn第 12 行出现错误:rnORA-00907: 缺失右括号rn求教,哪错了rn
ora-00907 缺少右括号
我在我的数据库中对另一个数据库建立了链路,并对一个本建了同义词,访问没有问题。rn 我想利用一个过程把这个表的数据导入的我本地服务器中。rn 我建了一个RECORD,中有一个字段类型是DATE的,对应远程表中一个DATE类型字段,rn 但是FETCH后,组成生成的SQL语句的时候,字段的数据由YYYY-MM-DD HH24:MI:SS变成了DD-MM-YY形式了。rn 所以在执行SQL语句时,提示ora-00907 缺少右括号rn 我本地数据的DATE类型格式也为YYYY-MM-DD HH24:MI:SS,但是FETCH后为什么格式变了呢?
orcal 建表 缺失右括号 怎么弄?
create table T_KP_USERSrn(rn ID numeric(6) not null auto_increment comment '用户ID',rn USERNAME varchar(30) not null comment '用户名称',rn PASSWD varchar(32) not null comment '密码',rn NAME varchar(30),rn SEX varchar(1) comment '1:男rn 2:女',rn PHONE varchar(30),rn SYSTMID varchar(20) comment '所属哪个系统rn 1:监控rn 2:企业在线rn 3:动态稽查rn 4:营运分析rn 5:系统管理rn 6:信息发布rn 7:服务质量信息考核',rn ROLE_ID numeric(6) not null comment '角色ID',rn ID_OWNER numeric(18),rn USER_STAT varchar(1) not null comment '0:注销状态rn 1:正常状态',rn MEMO VARCHAR2(200) comment '备注',rn CJSJ datetime,rn CJCZY varchar(30),rn ZHDLSJ datetime,rn ZHDLIP varchar(15),rn primary key (ID)rn)rntablespace TS_BUSI;
执行ORACLE SQL语句,报ora-00907 缺少右括号
select slm,substr(id,1,1) lb,sum(zajs) ajsnum,sum(wz) wznum,sum(tzz) tzznum,sum(dt) dtnum from ywk_xmxx join xtwh_struct_class on dh like 'substr(id,1,1)%' where length(slh)=2 and rnjgrq>=To_date(2010-7-1 00:00:00,'yyyy-mm-dd hh:mm:ss') and rn jgrq<=To_date(2010-10-16 23:59:59,'yyyy-mm-dd hh:mm:ss') group by slm,substr(id,1,1) rnrn请各位大侠帮忙分析下,谢谢
ORA-00907: 缺少右括号 错误 急!!!
declare rnv_sql varchar2(1024);rnbeginrnv_sql := 'create global temporary table t_temp_accountrn (materialID varchar2(7),rn start_amount number(5,0),rn start_money number(10,2),rn in_amount nmuber(5,0),rn in_money number(10,2),rn out_amount number(5,0),rn out_money number(10,2),rn finish_amount number(5,0),rn finish_money number(10,2)rn )on commit preserve rows';rn execute immediate v_sql;rnend;rn执行后 出现错误rndeclarern*rnERROR 位于第 1 行:rnORA-00907: 缺少右括号rnORA-06512: 在line 15rn我的sql语句没有错误的阿 找了半天 望高手指教!
oracle数据库建表时出现错误:缺失右括号
oracle数据库建表时出现错误:缺失右括号 这个错误一般都是用了oracle中没有的语法导致的,比如:identity函数是SQLSERVER中的,oracle中不能用;数字型定义在oracle中须全写number,只写num也会报这个错误。 调试方法:逐行注释
oracle建表时出现缺失右括号问题
create table studentsrn(rn stuID number primary key,rn stuName varchar2(20),rn stuSex char(2) check(stuSex='男' or stuSex='女') default('男'),rn stuAge number(3) check(stuAge between 0 and 100) default(0),rn stuCity varchar2(20),rn classID number(4)rn constraint students_fk foreign key(classID) references classes(classID)rn);rn第5行出现右括号缺失错误。rn请大家帮忙找一下是哪里错了。rn谢谢。rnrn
Oracle建表提示缺失右括号,求解决
[code=sql]create table teach(rn id number(8) primary key,rn item nvarchar2(10) not null,--评分项目rn criterion nvarchar2(50) not null,--评分标准rn grade number(3) not null--分值rn);[/code]rn去掉最后的分号正常执行,如果不去掉提示ORA-00907
缺失右括号的问题??
[code=SQL]rn我现在有一个这样的 过程 rn但是执行总是报 缺失右括号 不知道为什么 大家帮忙看看rnrncreate or replace procedure test_p isrntype tcur is ref cursor;rnfi_cur1 tcur;rndos1 date;rndos30 date;rnbeginrndos1 := to_date('2006-01-01','yyyy-mm-dd');rndos30 := to_date('2006-11-01','yyyy-mm-dd');rn open fi_cur1 for ' select distinct mbrid from fi06rn where ( mbrid=''1000'' and dos >= '||dos1||' and dos <= '||dos30||')';rn--。。。。rnend test_p;rn[/code]
缺失右括号
例如:rncrate table a(id not null number(4)); 就会报错:缺少")"rn但是:rncreate table a(id number(4) not null); 就不会报错。rn为什么呢?rnnot null 一定要放到后面吗?
缺失右括号问题
最近刚开始学ORACLE, 用的10gEX版本,用HR账号登陆。rn下面的语句: update jobs set max_salary = (1000+(select avg(max_salary) from jobs)) where job_id = 'AD_VP';没有问题。rn不过如果把+1000 放在后面变成:update jobs set max_salary = ((select avg(max_salary) from jobs)+1000) where job_id = 'AD_VP';rn就会提示缺失右括号。百思不得其解~~~rn分不多了,希望大家不吝赐教
缺失右括号????
我在创建一个表时,这两行老师提示缺失右括号rn去掉这两行就没问题rn没缺失右括号呀rn这是为什么?rnrn gender varchar2(10) ck_agents_gender check((gender='m')or(gender='f')),rn cellphone nvarchar2(20) uu_agents_cellphone unique
c++builder中的SQL语句出错:ORA-00907:缺失右括号
c++builder中的SQL语句出错:rn AnsiString stime,etime;rn stime="2008-12-9 1:18:00"; rn etime="2008-12-9 3:25:00"; rn ADOQuery1->Close();rn ADOQuery1->SQL->Clear();rn ADOQuery1->SQL->Add("Select distinct tag_value.* from tag_value where tag_value.clock> to_date('"+stime+"','yyyy-mm-dd hh24:mi:ss') and tag_value.id=134 or tag_value.id=129 or tag_value.id=130 and tag_value.clock<= to_date ('"+etime+"','yyyy-mm-dd hh24:mi:ss') order by tag_value.clock");rn ADOQuery1->Open();rn出现错误rn ORA-00907:缺失右括号rnrnrn如果将SQL语句改成Select distinct tag_value.* from tag_value where tag_value.clock> to_date('"+stime+"','yyyy-mm-dd [color=#FF0000]hh24:mi'[/color]) and tag_value.id=134 or tag_value.id=129 or tag_value.id=130 and tag_value.clock<= to_date ('"+etime+"','yyyy-mm-dd [color=#FF0000]hh24:mi'[/color]) order by tag_value.clockrn就不会出错!rn搞不清楚是怎么回事?请教各位大侠!
使用别名应注意(报"缺失右括号"的错误)
(Oracle测试)使用SQL语句的select语句是经常会用到字段和表的的别名,使用要注意,字段的别名前面可以加as关键字,或是省略不写,但是表名的别名前面不可以加as,否则会报如下错误: [color=red]命令出错, 行: 11 列: 20 错误报告: SQL 错误: ORA-00907: 缺失右括号 00907. 00000 - &quot;missing right parenth...
ORACLE子查询有order by 报缺失右括号
[code=sql]select PM_MODEL_CODE,(select WD_IN_TIME from T_WIP_DETAIL where WD_MODEL_CODE=m.PM_MODEL_CODE and ROWNUM=1 order by WD_IN_TIME) WD_IN_TIMErn from T_PM_MO_BASE m group by PM_MODEL_CODE[/code]rnrn括号里我又必须按时间排序,然后取第一个,求解决方法
oracle 插入数据时缺失右括号???
这是我建的表: rncreate table users(rn userid varchar2(30) primary key,rn username varchar2(30) not null,rn userpassword varchar2(30) not nullrn );rn这个没有报错,当我插入数据时,就出现了右括号缺失这个错误,大家帮帮忙吧!我是新手,很多都不懂。谢谢哈!rn这是我插入的数据:insert into users select ('1','david','123456')。
建表时缺少右括号错误
我以前用的是mssql,现因工作需要转向Oracle,建一个表的时候,老提示缺少右括号:rn sex number(1,0) not null and check(sex=0 or sex=1) and default 0,rn *rnERROR 位于第 6 行:rnORA-00907: 缺少右括号rnrn脚本如下,请高手指点:
oracle pl/sql 插入数据缺失右括号00907错误
急!!! 急!!! 急!!!rnrnCREATE TABLE mrecord (rn id NUMBER(8) NOT NULL,rn smemberid VARCHAR2(50) NULL,rn stestid NUMBER(8) NULL,rn stesttitle VARCHAR2(100) NULL,rn sdate VARCHAR2(100) NULL,rn sstatus CHAR(20) NULL,rn sscore VARCHAR2(100) NULL,rn sanswertitle VARCHAR2(100) NULL,rn sevaluation VARCHAR2(4000) NULL,rn ssuggestion VARCHAR2(4000) NULL,rn CONSTRAINT PK_mrecord PRIMARY KEY (id)rn ) ;rnrninsert into UDEMO.MRECORD (ID, SMEMBERID, STESTID, STESTTITLE, SDATE, SSTATUS, SSCORE, SANSWERTITLE, SEVALUATION, SSUGGESTION)rnvalues (1547, 'xyy', 115, '个人信息', to_date(''2010-03-17 13:37:00'', 'YYYY-MM-DD HH24:MI:SS'), 1, '', '', '', '');rnrninsert into UDEMO.MRECORD (ID, SMEMBERID, STESTID, STESTTITLE, SDATE, SSTATUS, SSCORE, SANSWERTITLE, SEVALUATION, SSUGGESTION)rnvalues (1651, 'ly', 163, '个人信息', to_date(''2010-03-18 18:00:00'', 'YYYY-MM-DD HH24:MI:SS'), 1, '60', '绩效管理与工作分析能力有待提高', '评估结果表明,基于这次的培训内容,您对“绩效管理与工作分析”知识和技能的掌握还有待提高,您没有很好的把所学的知识灵活运用到工作中,对于绩效管理与工作分析的重要性,以及绩效管理与工作分析的相关工作流程,您可能还需要继续学习。但绩效管理与工作分析难以操作的地方在于方法的选用与细节的操作,基于观念,让公司员工能够真正认可,是一件非常困难的事情,这需要有效的沟通;细节的操作,能够做到公平公正,科学客观,也是需要相关知识的积累与实践,在这些方面的操作,您可能需要投入更多的精力去学习与积累,只要您不断努力,您也会是最棒的! ', '');rn
奇怪的问题 ORA-00907: 缺少右括号
一个非常奇怪的问题rnrn存储过程建立如下rnCREATE OR REPLACE PROCEDURE go (id integer)rnIS rnBEGIN rn return;rnEND go;rnrn在 SQL Plus中调用结果如下rnrnSQL> call go(0);rnrnMethod calledrnrnSQL> call go(id => 0);rnrncall go(id => 0)rnrnORA-00907: 缺少右括号rnrnSQL> rnrnrn怎么会有 ORA-00907: 缺少右括号 这个错误
sql语句缺失右括号
我是根据前台传过来的年龄段对人员表里的生日字段进行查询rnsql语句如下rn[code=sql] select * from BC_BCOA_PERSON WHERE PERSON_ID != 0 and PERSON_DELETE=0 and(YEAR (CURDATE()) -1 - YEAR (PERSON_BIRTHDAY) + (DATE_FORMAT(PERSON_BIRTHDAY,'%m%d') <= (DATE_FORMAT(CURDATE(), '%m%d'))))>=20 AND (YEAR (CURDATE()) -1 - YEAR (PERSON_BIRTHDAY) + (DATE_FORMAT(PERSON_BIRTHDAY, '%m%d') <= (DATE_FORMAT(CURDATE(), '%m%d'))))<=100 [/code]rnrn谢谢大家
sql代码缺失右括号
sb.append("select MCHT_NO,MCHT_NM,LICENCE_NO,APPLY_DATE,MAPPING_MCHNTCDONE,MAPPING_MCHNTCDTW O,MCHT_STATUS,TERM_COUNT from ");rnsb.append("((SELECT * FROM TBL_MCHT_BASE_INF_TMP t1 left outer join TBL_BRH_INFO t2 on t2.brh_id=t1.agr_br ) A left outer join (select MCHT_CD,count(1) AS TERM_COUNT from TBL_TERM_INF group by MCHT_CD) B ON (A.MCHT_NO = B.MCHT_CD))");rnsb.append("where MCHT_STATUS IN ('1','3','5','6','8','R') ");rnrnrn运行的时候显示上述代码缺失右括号,但是在数据库中可以运行出来,这是什么原因
相关热词 c#检测非法字符 c#双屏截图 c#中怎么关闭线程 c# 显示服务器上的图片 api嵌入窗口 c# c# 控制网页 c# encrypt c#微信网页版登录 c# login 居中 c# 考试软件