| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 723 人关注过本帖
标题:救急!!JAVA和MYSQL编程遇到的问题。 怎样把键盘上输入的数据和数据库中的 ...
只看楼主 加入收藏
emilie
Rank: 1
等 级:新手上路
帖 子:20
专家分:0
注 册:2007-6-26
收藏
 问题点数:0 回复次数:1 
救急!!JAVA和MYSQL编程遇到的问题。 怎样把键盘上输入的数据和数据库中的数据做比

数据库已经建好,需要从键盘输入字符,然后把输入的字符和数据库中匹配的数据做比较。
Ex:
数据库的数据表格为:
CREATE TABLE scores (ID text not null,
E char(1) not null,
P char(1) not null,
N char(1) not null,
ACH char(1) not null,
CLV char(1) not null,
CON char(1) not null,
EST char(1) not null,
LED char(1) not null,
AFL char(1) not null,
REC char(1) not null);

插入数据为:
insert into scores values('_CONS23','0','+','0','+','-','+','0','0','-','0');
insert into scores values('_GUZZO','+','0','0','+','0','0','+','+','+','0');
insert into scores values('_HINCELI','0','0','+','+','-','+','0','-','0','0');
insert into scores values('4','0','-','-','0','+','-','0','+','+','+');
insert into scores values('4679','0','+','-','0','0','0','+','0','-','-');
insert into scores values('5','0','+','-','0','+','-','+','+','0','0');
insert into scores values('6','+','+','-','0','+','-','+','+','+','0');
insert into scores values('630528','+','0','-','0','+','-','+','+','0','0');
insert into scores values('7','0','-','0','-','0','0','0','0','+','+');
insert into scores values('8','0','-','0','-','0','0','0','-','+','+');
insert into scores values('9','0','-','0','-','0','0','0','0','+','+');
insert into scores values('A.F.N.','-','0','+','+','-','+','-','-','-','0');
insert into scores values('A.H','+','-','-','-','+','-','0','+','+','+');
insert into scores values('AATIQ','0','0','+','0','-','+','0','0','-','0');
insert into scores values('AATIQ2','+','+','0','+','-','0','+','+','-','-');
insert into scores values('ABCDE2','+','0','-','-','+','-','+','+','0','0');
insert into scores values('ABRAH','0','+','0','+','-','+','0','0','-','-');
insert into scores values('ABUMBA','0','0','-','0','0','0','0','0','0','0');
insert into scores values('ACCOU','-','+','0','+','+','0','0','0','-','-');
insert into scores values('ACQUAVIV','+','0','0','0','0','0','0','+','0','0');
insert into scores values('ACTI_PJ','-','0','+','+','-','+','-','-','-','0');
insert into scores values('ACTI_SK','+','+','+','+','0','0','+','+','0','-');

我从键盘输入“P=0;E=+;”
怎样把输入的字符和数据库中的数据做比较,输出与之匹配的元组?

各位大虾帮帮忙啊!!!

搜索更多相关主题的帖子: JAVA null char 数据库 not 
2007-06-26 21:21
emilie
Rank: 1
等 级:新手上路
帖 子:20
专家分:0
注 册:2007-6-26
收藏
得分:0 

拜托各位大虾帮下忙啊~~拜托拜托~~


2007-06-27 21:10
快速回复:救急!!JAVA和MYSQL编程遇到的问题。 怎样把键盘上输入的数据和数据库 ...
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.023790 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved