mysql语句求指明错误?

做了一个表sicence_fiction_film,如图所示:图片说明,想删除名字列中aaa这一行,输入如下:
delete from sicence_fiction_film where name=aaa;
结果却报错说不知道列aaa在哪儿?
求解答?

5个回答

delete from sicence_fiction_film where name='aaa';
name在数据库是varchar类型的要加上单引号,就好比java里面的字符串要加上双引号一样,否则就会报错。

david_liu_1
david_liu_1 非常感谢。
3 年多之前 回复
 delete from sicence_fiction_film where `name`='aaa';
关键字要转义,aaa要引号
david_liu_1
david_liu_1 非常感谢
3 年多之前 回复

delete from sicence_fiction_film where name="aaa";

条件设置时字符串要加上""号的。

david_liu_1
david_liu_1 非常感谢
3 年多之前 回复

每种语言都有关键字,多多注意就是啦!~

david_liu_1
david_liu_1 非常感谢
3 年多之前 回复

这行报错,一般会在=附近提示这边报错,就应该知道是name=aaa;报错的,然后检查这边 的字段类型是否匹配

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
入门新人求指明mysql代码错误
刚刚接触mysql,用navicat建了一个名为tv_play表,如下图:n![图片说明](https://img-ask.csdn.net/upload/201603/07/1457329515_871079.png)nn那么问题来了,我想删除所有科幻类型的电视剧,所以输入一下代码:ndelete from tv_play where genre=Science Fiction;nn之后却显示代码语法错误,求能人指明,谢谢。
MYSQL语句错误求指导
grant all privileges on postfix.* to postfixadmin@localhost indentified by 'postfixmaster'rnrn提示:rnRROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near rn
请问:“错误:未指明的错误”
在页面运行中,弹出对话框,提示错误信息:rnrn”出现了运行时间错误。是否要进行调试?行228; 错误:未指明的错误” rnrn这个页面里面有个iframe。定时刷新,请问是什么原因造成的错误呢?
关于链表的一个程序,求指明错误。
这个程序的错误我看不明白,请教。rn程序作用:输入一个整数,检查链表中是否包含此数,如有输出该数,如没有输出 Not fand!rn#include rnrnstruct entryrnrn int value;rn struct entry *next;rnrnrnstruct entry * findEntry(struct entry *listptr,int match)rnrn while(listptr!=(struct entry *)0)rn rn if(listptr->value==match)rn return(listptr);rn elsern listptr=listptr->next;rn rn return (struct entry *)0;rnrnrnint main(void)rnrn struct entry * findEntry(struct entry *listptr,int match);rn struct entry n1,n2,n3;rn struct entry*listptr,*listStart=&n1;rn int search;rnrn n1.value =100;rn n1.next=&n2;rnrn n2.value=200;rn n2.next=&n3;rnrn n3.value=300;rn n3.next=0;rnrn printf("Enter value to locate:");rn scanf("%i",&search);rnrn listptr=findEntry(listStart, search);rnrn if(listptr!=(struct entry *)0)rn printf("Found %i.\n",listptr->value);rn elsern printf("Not found");rnrn return 0;rn
未指明的错误
请问用企业管理器打开数据库的时候出现下列错误,但是查询分析器连接打开有没问题是怎么回事呀???rnrn“错误:未指明的错误rn代码:0rnurl : res://E:\Program%20Files\Microsoft%20SQL%20Server\80\Tools\Binn\Resources\2052\sqlmmc.rll/Tabs.html”
js未指明的错误
在使用js构建树的时候出现未指明的错误:行:5459,char:49,错误:未指明的错误,url:http://localhost:11904/YQKC_ERP/BPOutput/BPOInput.aspxrn可是我的代码根本就没有5千多行啊,这个是什么错误?
mysql 语句有错误...求帮忙
update comment set comment.pid=team.pid where comment.tid=team.id; rncomment 和 team 是同一个数据库中的表...,这条语句的目的是根据comment中的字段tid,对应team表中字段id,, 填充comment表中的pid
IE7:未指明的错误,解决办法
转自:http://www.nbman.cn/article.asp?id=40   Daniel最近用本本里的IE7测试网站时老报[未指明的错误],但在Firefox却都正常的! 刚刚上百度搜索了一下,终于找到了问题所在! 原来是安装了Internet Explorer 增强的安全配置的原因,在添加或删除程序里的添加删除WINDOWS组件里把这个Internet Explorer 增强的安全...
mysql 语句有错误
group等为关键字,不能作为字段名,改为group_name
MySQL语句INSERT INTO 错误 ?
[code=Java]sFileInsert="Insert Into noticefile (FILE_NAME,FILE_PATH) Values('"+sFileName+"','"+sFilePath+"');";rn out.println(sFileInsert);rn //添加文件内容rn stm.execute(sFileInsert);[/code]rnrnrn这是我写在JSP页面里面的两条语句rnFILE_NAME 和 FILE_PATH 是noticefile表里面的两个字段rn但是tomcat每次都报错,说 stm.execute(sFileInsert); 有错误,我看了半天也不知道到底是哪里错了,而且我要写入的数据打印出来都是正确的,就是执行时出错,请大家帮忙看一下,我对数据库不熟悉:rnrnrnorg.apache.jasper.JasperException: An exception occurred processing JSP page /AddNotice.jsp at line 89rnrn86: //添加文件内容rn87: out.println(sFileInsert);rn88: rn89: stm.execute(sFileInsert);rn90: rn91: rn92: String sInsert="INSERT INTO NOTICE (NOTICE_TITLE,NOTICE_CONTENT,NOTICE_SIGNER,NOTICE_DATE,MANAGER_NAME) VALUES ('"+sTitle+"','"+sContent+"','"+sSigner+"','"+sDate+"','"+sName+"');";rnrnrnStacktrace:rn org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:717)rn org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:73)rn org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:73)rnrnrnroot cause rnrnjavax.servlet.ServletException: java.sql.SQLException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '锛� at line 1rn org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:862)rn org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)rn org.apache.jsp.AddNotice_jsp._jspService(AddNotice_jsp.java:203)rn org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:717)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:717)rn org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:73)rn org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:73)rnrnrnroot cause rnrnjava.sql.SQLException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '锛� at line 1rn com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2901)rn com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1584)rn com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1675)rn com.mysql.jdbc.Connection.execSQL(Connection.java:2295)rn com.mysql.jdbc.Connection.execSQL(Connection.java:2228)rn com.mysql.jdbc.Statement.execute(Statement.java:883)rn org.apache.jsp.AddNotice_jsp._jspService(AddNotice_jsp.java:149)rn org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:717)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:717)rn org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:73)rn org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:73)rnrnrnnote The full stack trace of the root cause is available in the Apache Tomcat/6.0.20 logs.rnrn
MYSQL语句错误
MySQL数据库中rn[code=SQL]rnupdate games set games.status = 2 inner join gameapplywaysrnon games.id = gameapplyways.game_id rnwhere gameapplyways.apply_deadline < curdate() rnand games.status = 7 and games.id = 6rn[/code]rn这句SQL老是提示错误。为什么啊?rnYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'inner join gameapplywaysrnon games.id = gameapplyways.game_idrnwhere gameapplyw' at line 1
mysql语句查询错误
用java编程,条件查询mysql的数据表rn代码如下:rnpublic Object[] getData(String data) throws SQLExceptionrn rn //通过id得到行数据rn String sql = "select * from speciesinfo where id = 'data'" ; rn ResultSet rs=con.executeQuery(sql);rnrn ResultSetMetaData rsmd=(ResultSetMetaData) rs.getMetaData();rn //读取数据表中的列数 rn int numberOfColumns = rsmd.getColumnCount(); rn Object[] object=new Object[numberOfColumns];rn System.out.println(rs.next());rnrn //读取数据库表中当前行中指定列的值rn while (rs.next()) rn for(int i = 0; i
这个mysql语句错误?
SELECT * FROM phpbb_users a where a.user_id not in (select user_id from ag_users);rnrn这个语句怎么错了?
SQLCE 未指明的错误 [ sqlceca35.dll ]
我的开发环境是 VS2008+SQLServer2000+IIS6.0rn开发WinCE的项目rnrn我刚开始接触WinCE,参考网上的资料,下载安装了Microsoft SQL Server CE 2.0,并在IIS中部署了rn使用http://localhost/sqlce/sscesa20.dll 浏览,也提示正确信息 SQL Server CE Server Agentrnrnrn然后我再WinCE的程序中想实现RDA(远程数据访问)的功能,rn编写如下代码rnrnrn//添加引用rnusing System.Data.SqlServerCe;rnrnrnSqlCeRemoteDataAccess rda = new SqlCeRemoteDataAccess();rnrnrnrn我引用的SqlServerCe的版本是3.5 版本的。rn它运行就报错 “ 未指明的错误 [ sqlceca35.dll ] ”rnrnrn向各位大虾请教,是什么原因? rnrn是版本不对应的问题吗?rnrn
mysql 语句错误??
[code=sql]update `page` set page_latest=(select max(rev_id) from `revision`) where page_id=(select max(page_id) from page);rn[/code]rnrn请问上面的语句错哪了?rnrn
mysql语句错误,求解
select voucherid,name,min(discount) from (rnselect * from (select c.taid,d.said,a.voucherid,a.name,b.discount,e.avgprice,d.sname,c.tname,e.reviews,a.voucherfrom,a.voucherlogo,a.couflag,a.disflag rnfrom ((select * from zt_sh_voucher where disable=0 and status=0 and sstatus=1 and pid=1001 and cityid=351 and taid=248 and keyword like '%%') a rninner join zt_sh_thrarea c on a.taid=c.taid and c.taid=248 inner join zt_sh_secsarea d on c.said=d.said and d.said=20rninner join zt_sh_vouchershops e on a.voucherid = e.voucherid)rnleft join (select * from zt_sh_carddiscounts where status=1 and disable=0 and date_format(starttime,'%Y-%m-%d')<='2010-12-15' rnand date_format(endtime,'%Y-%m-%d')>='2010-12-15') b on a.voucherid = b.voucherid)) v group by v.voucherid,v.name;rnrnrn在mysql中执行报错 错误信息如下:Error Code : 1248rnEvery derived table must have its own alias
mysql 创建表语句错误
[code=SQL]rn create table husband (rn pk_id varchar(255) not null auto_increment,rn name varchar(255),rn wife_pk_id varchar(255),rn primary key (pk_id)rn )rn[/code]rnrn报错:Incorrect column specifier for column 'pk_id'rnrn实在找不出来哪里错了,请指点下~rnrnthanks in advance~
mysql 语句错误
CREATE PROCEDURE dowhile()rnBEGINrn DECLARE v1 INT DEFAULT 5;rn WHILE v1 > 0 DOrn SET v1 = v1 - 1;rn END WHILE;rnENDrnrn我运行mysql帮助里面的程序会报错,不知道为什么,请知道的告诉我一下rnrn错误代码: 1064rnYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INT DEFAULT 5' at line 3rn(耗费 0 ms)rnrn错误代码: 1064rnYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHILE v1 > 0 DOrn SET v1 = v1 - 1' at line 1rn(耗费 0 ms)rnrn错误代码: 1064rnYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'END WHILE' at line 1rn(耗费 0 ms)rnrn错误代码: 1064rnYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'END' at line 1rn(耗费 0 ms)
MySQL 语句错误,退出
mysql&amp;gt; create table order(`orderID int primary key auto_increment,     `&amp;gt; ;     `&amp;gt; );     `&amp;gt;      `&amp;gt;      `&amp;gt;    mysql语句输入法错误,无法正常退出当前语句 需要输入 `\c `&amp;gt; `\c mysql&amp;gt; 正常退出了,回到mysq...
mysql创建表语句错误
mysql> creat table backupmetafiles(rn -> Id int(11) NOT NULL AUTO_INCREMENT,rn -> FilePath varchar(255) ,rn -> FileName varchar(255) ,rn -> FileSize varchar(128) ,rn -> LastModified varchar(255) ,rn -> BackupCreatTime varchar(255) ,rn -> PRIMARY_KEY Id);rnrn错误信息rnERROR 1064 (42000): You have an error in your SQL syntax; rn请问各位大侠哪里错了?
EXT出现未指明错误
EXT2.0在IE中经常会出现未指明错误,即UnkonwnException,貌似是由EXT内部抛出的异常,请问是EXT的BUG吗?还是其他原因引起的。比方说,创建了一个Window,然后显示、隐藏多次后,便会抛出此异常,但有的又不会。一般是比较复杂的页面才会出现这样的问题。n[b]问题补充:[/b]nTo yourgame:rnrn呵呵~如果我告诉你,在Firefox底下怎么试都不会有问题,你信吗?
求一条语句的错误
select CZJSDB.QY_Info.QYName,CZJSDB.QY_Info.QYSH,CZJSDB.CZJS_DS.FLAG,CZJSDB.CZJS_SF.SFFS,CZJSDB.CZJS_SF.SFcnt,CZJSDB.CZJS_SF.SFyear from CZJSDB.QY_INFO left join CZJSDB.QY_KP on CZJSDB.QY_Info.QYSH=CZJSDB.QY_KP.QYSH left join CZJSDB.CZJS_DS on CZJSDB.QY_Info.QYSH=CZJSDB.CZJS_DS.QYSH left join CZJSDB.CZJS_SF on CZJSDB.QY_Info.QYSH=(select CZJSDB.CZJS_SF.QYSH from CZJSDB.CZJS_SF where CZJSDB.CZJS_SF.SFyear='2009年') where qyqy like 'A1'rn执行后报单行子查询返回多于一个行错.rn将CZJSDB.QY_Info.QYSH=(select CZJSDB.CZJS_SF.QYSH from CZJSDB.CZJS_SF where CZJSDB.CZJS_SF.SFyear='2009年')改为CZJSDB.QY_Info.QYSH in (select CZJSDB.CZJS_SF.QYSH from CZJSDB.CZJS_SF where CZJSDB.CZJS_SF.SFyear='2009年')后执行为死循环.rn求解决办法.
求MySQL删除语句
数据表user中有id,uid,name三个字段rn用一条SQL语句实现以下功能:rn(1),请求删除数据库中uid=2,name="wn"的一条记录rn(2),当数据表中uid=2的记录少于2条时不得删除,uid=2的记录数等于或大于2条时删除(1)所述记录rn
求一MYSQL语句
现在我一个表中存放有十多个类别的文章,比如某个省的新闻:rnrnA市:表字段值 arn新闻1,新闻2,新闻3,新闻4,新闻5,新闻6,新闻7,新闻8,新闻9,新闻10rnrnB市:表字段值 brn新闻1,新闻2,新闻3,新闻4,新闻5,新闻6,新闻7,新闻8,新闻9,新闻10rnrnC市:表字段值 crn新闻1,新闻2,新闻3,新闻4,新闻5,新闻6,新闻7,新闻8,新闻9,新闻10rnrnD市:表字段值 drn新闻1,新闻2,新闻3,新闻4,新闻5,新闻6,新闻7,新闻8,新闻9,新闻10rnrn这些新闻都存放在一个表中,根据市区代号区分。现在我想调用每个市最后面的5条新闻,然后存放到一起随机打乱再显示。rnrn请问这个SQL语句怎么写? 查询每个市最后五条再存放到一个数组这显然是浪费资源的,对SQL语法不熟,敢请各位前辈给个指导,能否有什么简短的SQL语句一次性查出。。谢谢。
求MYSQL语句优化
小弟不才。。涉及两个表的操作。。于是写了如下冗长的mysql语句,求高手帮忙优化顺便指点下。rnrnrnSELECT id,partner_id, rn(SELECT TITLE FROM partner WHERE id=team.partner_id) as partner_title, rn(SELECT location FROM partner WHERE id=team.partner_id) as partner_location, rn(SELECT longlat FROM partner WHERE id=team.partner_id) as other, rn(SELECT address FROM partner WHERE id=team.partner_id) as partner_address,rn(SELECT homepage FROM partner WHERE id=team.partner_id) as homepage, rn((team_price / market_price) *10) as ddd,sort_order,rn title, userreview, product,now_number,group_id, FROM_UNIXTIME(expire_time) as expire_time, FROM_UNIXTIME( begin_time) AS begin_time, FROM_UNIXTIME(end_time) AS end_time,rnteam_price,summary ,market_price,image,summary,notice,detail FROM team rn WHERE id=@id rn ORDER by sort_order desc
求mysql语句
现在有root权限了rn[img=http://upload.ouliu.net/f/b19d3e98cd1fc9688eaf7d0062d79706.bmp][/img]rn密码我忘记了rn我现在想执行一条语句显示所有用户和密码rn
求个MYSQL语句
有两个相同结构的表分别在两个数据库rnA库A表 字段 ID name pass rnB库B表 字段 ID name pass rn求个合并语句,name字段有重复名。。。
求一句MYSQL的语句~
其中有2个列id和replyid,其中id为自动编号,要求在插入语句的时候,replyid能同时插入同id一样的编号。就用一句能行吗?
求Mysql语句求和
select uid,u.id,price,count(*),[color=#FF0000]sum(price*count(*)) [/color]from ad_app_click_count as a left join ui_application as u on a.package=u.package where projectId=49 group by u.id;rnrnrnprice为单价rncount(*)为数量rnrnrn我想求所有的总和,但是[color=#FF0000]sum(price*count(*)) [/color]报错1111 - Invalid use of group functionrnrnrn如果直接sum(price)是不报错的,大佬们,请指点一下
求一段mysql 语句
+----+---------+rn| id | content |rn+----+---------+rn| 8 | 8 |rn| 14 | 8 |rn| 17 | 8 |rn| 9 | 7 |rn| 15 | 7 |rn| 16 | 7 |rn| 11 | 6 |rn| 12 | 6 |rn| 13 | 6 |rn| 18 | 6 |rn| 19 | 6 |rn+----+---------+rn就是content相同的数据分别取3条,比如上面(content=8,7,6的分别取3条就足够了。)rn结果:rn+----+---------+rn| id | content |rn+----+---------+rn| 8 | 8 |rn| 14 | 8 |rn| 17 | 8 |rn| 9 | 7 |rn| 15 | 7 |rn| 16 | 7 |rn| 11 | 6 |rn| 12 | 6 |rn| 13 | 6 |rn+----+---------+rn求助,非常感谢!sql弱势,记得在sql server中用row_number实现过,可是 刚用mysql不是很熟悉,万分感谢
求一条mysql语句
求一条mysql语句:rn条件:相同结构的表A和表Brn要求:在向A插入数据的时候将该数据同时插入表B
求一条mysql 语句???
原来的表rn col1 col2 rn A001 aarn A001 bbrn A001 ccrn A002 ddrn A002 eern rn我想转换为以下 样式rn col1 col2 rn A001 aa,bb,ccrn A002 dd,eern
求MySQL语句写法
INSERT INTO employee_inforn (`user_id`, `password`, `name`, `sex`, `department`, `position_id`, `position`, `office_number`, `mail`, `birthday`, `ismarry`, `telephone`, `postcode`, `address`, `id_card`, `found_date`, `del`, `budget`, `submit`, `sys`, `formInfo`)rnVALUESrn (58, '', '', NULL, 'y', 10, 'xx', '', '', '', NULL, '', '', '', '', '2011-08-03 09:44:38', 1, NULL, NULL, NULL, NULL);rnrnINSERT INTO employee_inforn (`user_id`, `password`, `name`, `sex`, `department`, `position_id`, `position`, `office_number`, `mail`, `birthday`, `ismarry`, `telephone`, `postcode`, `address`, `id_card`, `found_date`, `del`, `budget`, `submit`, `sys`, `formInfo`)rnVALUESrn (59, '', '', NULL, 'y', 10, 'xx', '', '', '', NULL, '', '', '', '', '2011-08-03 09:45:01', 1, NULL, NULL, NULL, NULL);rnrnINSERT INTO employee_inforn (`user_id`, `password`, `name`, `sex`, `department`, `position_id`, `position`, `office_number`, `mail`, `birthday`, `ismarry`, `telephone`, `postcode`, `address`, `id_card`, `found_date`, `del`, `budget`, `submit`, `sys`, `formInfo`)rnVALUESrn (60, '', '', NULL, 'y', 10, 'xx', '', '', '', NULL, '', '', '', '', '2011-08-03 09:45:24', 1, NULL, NULL, NULL, NULL);rnrnINSERT INTO employee_inforn (`user_id`, `password`, `name`, `sex`, `department`, `position_id`, `position`, `office_number`, `mail`, `birthday`, `ismarry`, `telephone`, `postcode`, `address`, `id_card`, `found_date`, `del`, `budget`, `submit`, `sys`, `formInfo`)rnVALUESrn (65, '', '', NULL, 'x', 9, 'a', '', '', '', NULL, '', '', '', '', '2011-08-03 10:48:55', 1, NULL, NULL, NULL, NULL);rnrnINSERT INTO job_messagern (`position_id`, `position_name`, `total`, `level`, `space`, `department`, `department_id`, `detail`, `found_date`, `del`)rnVALUESrn (9, 'a', 20, '', 20, 'x', 1, '', '2011-08-03 09:42:26', 1);rnrnINSERT INTO job_messagern (`position_id`, `position_name`, `total`, `level`, `space`, `department`, `department_id`, `detail`, `found_date`, `del`)rnVALUESrn (10, 'xx', 12, '', 12, 'y', 2, '', '2011-08-03 09:44:26', 1);rnrnINSERT INTO job_messagern (`position_id`, `position_name`, `total`, `level`, `space`, `department`, `department_id`, `detail`, `found_date`, `del`)rnVALUESrn (11, '4部1分', 2, '', 2, '4部', 4, '', '2011-08-03 11:56:34', 1);rnrn这两个是见表语句rnupdate job_message,employee_info, (rnselect count(employee_info.position_id) as employeed ,position_name from employee_inforn right join job_message on job_message.position_id = employee_info.position_id where job_message.del=1 rnand job_message.del=1rngroup by employee_info.position_id ) as p set job_message.space=job_message.total-case when p.employeed is null then 0 else p.employeed end where job_message.position_id = employee_info.position_id and job_message.del=1;rn这个是执行语句,执行出来没效果,求解释
求MYSQL语句
[code=SQL]-- phpMyAdmin SQL Dumprn-- version 2.11.4rn-- http://www.phpmyadmin.netrn--rn-- 主机: localhostrn-- 生成日期: 2011 年 04 月 13 日 06:39rn-- 服务器版本: 5.0.51rn-- PHP 版本: 5.2.5rnrnSET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";rnrn--rn-- 数据库: `zhongliang`rn--rnrn-- --------------------------------------------------------rnrn--rn-- 表的结构 `zl_agency`rn--rnrnCREATE TABLE IF NOT EXISTS `zl_agency` (rn `agency_id` smallint(5) unsigned NOT NULL auto_increment,rn `agency_name` varchar(255) NOT NULL,rn `agency_desc` text NOT NULL,rn `telephone` varchar(11) NOT NULL,rn PRIMARY KEY (`agency_id`),rn KEY `agency_name` (`agency_name`)rn) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ;rnrn--rn-- 导出表中的数据 `zl_agency`rn--rnrnINSERT INTO `zl_agency` (`agency_id`, `agency_name`, `agency_desc`, `telephone`) VALUESrn(1, '北京办事处', '北京市朝阳区望京南湖东园122楼', '12345678911'),rn(2, '上海办事处', '上海市朝阳区望京南湖东园123楼', '23456789011'),rn(3, '重庆办事处', '上海市朝阳区望京南湖东园124楼', '15007365581'),rn(4, '海南办事处', '上海市朝阳区望京南湖东园125楼', '13466705321'),rn(5, '江西办事处', '上海市朝阳区望京南湖东园126楼', '15007365827');rn[/code]
求一段mysql语句
批量入库1-1000条数据到数据库rnrn用当前id的后1位填充password字段.
求一句MYSQL语句
我一个表table1rn下面有三个字段rnid(自动) id1 namern1 2,3,5 小张 rn2 4,6,8 小王rn3 5,7,9 小燕rn4 1,11,12 小李rn5 4.8,3 小王rn.. ..无规律 rnrn我从别的一个页面传一个id1值过来与表table1相同的一个值就显示出来rn从jsp别的页面只能传一个数字。问题是现在有id1有三个数字,怎么写MYSQL这个句rn
求SQL语句(mysql)
譬如:rn表Arnid a brn1 3 4rn3 4 5rnrn表Brnid c drn1 7 8rn2 9 10rn我想得到结果集:rnid a b c drn1 3 4 7 8rn2 空 空 9 10rn3 4 5 空 空rnrn请问怎么写sql语句啊
求一条MySql的语句????
我有一张users表!我想查询sex=nan的这列的前五条记录!
求一MySql语句
需求:rn1 1rn2 1rn3 2rn4 2rn5 2rn6 3rn7 3rn8 3rn9 3rnrn结果rnrn1 1rn2 1rn1 2rn2 2rn3 2rn1 3rn2 3rn3 3rn4 3rn要求:rn能在MySql中运行
求mysql 语句
有一表 tmsrn字段 rn id auto_incrementrn TeamID int(11) UNSIGNED rn Set1 tinyint(4) UNSIGNED rn OT1 tinyint(4) UNSIGNED rnSelect count(*) as mCount,if(OT1!=0,sum(1),false) as cOT1 From `tms` group by TeamIDrnrncount(*) as mCount =>所有符合条件的记录数量rnrnif(OT1!=0,sum(1),false) as cOT1 => OT1 不等于0的记录的数量.rnrn为何得出来的数量(if(OT1!=0,sum(1),false) as cOT1) 不正确的,怎样改?
相关热词 c# xml的遍历循环 c# 取 查看源码没有的 c#解决高并发 委托 c#日期转化为字符串 c# 显示问号 c# 字典对象池 c#5.0 安装程序 c# 分页算法 c# gmail 发邮件 c# 多层文件