mysqlÍâ¼ü - ÆäËûÊý¾Ý¿â¿ª·¢ / MySQL/Postgresql
ÎÒÓõÄÊÇmysql6.0Ϊʲôһ´´½¨Á½¸ö±íÕâ¼äÓÃÍâ¼üÀ´Á¬½Óʱ¾Í˵´´½¨²»ÁË£ºcan"nt create table ...
ÄãµÄÓï¾äÊÇʲô£¿ÄãµÄ±íÊÇʲô´æ´¢ÒýÇ棿 Èç¹ûÊÇmyisam Ôò²»Ö§³ÖÍâ¼ü£¬ÄãÐèÒª°Ñ±í¸ÄΪinndb
貼³öSQL語¾ä
Èç¹ûSQL語¾ä沒問題,ÄÇ麼檢²éһϱíµÄ½¨Á¢順Ðò,ÒªÏȽ¨Ö÷±í,刪³ýµÄ時ºòÒª×îáá刪³ýÖ÷±í
ÎÊÌ⣺mysql error Number 1005
can't creat table'\test\#sql-640_1.frm'(errno:150)
Õâ¸öÎÊÌâ³öÏÖÔÚ¸ø±í¼ÓÍâ¼üʱ¡£
Ëü¿ÉÄܳöÏÖµÄÇé¿öÊÇÒÔÏÂÈýÖÖ£º
1¡¢ÒýÓõļüÓëÔ±íÖеÄÊý¾ÝÀàÐͲ»Ò»Ö¡£
±¾È˳ö´í¾ÍÊÇÕâ¸öÔÒò£¬Ô±íÖÐIDΪintÀàÐÍ £¬µ«ÊǼÓÍâ¼üµÄÄǸö±íÖÐÊÇbigintÀàÐÍ¡£
2¡¢ÕÒ²»µ½Òª±»ÒýÓõÄÁÐ
¾ÍÊÇÕÒ²»µ½ÄǸöÒýÓÃÍâ¼ü±íÖÐûÓÐÄǸöÍâ¼ü¡£
3¡¢±íµÄ×Ö·û±àÂë²»Ò»Ñù
Ò»°ã²»»á³öÏÖÕâ¸öÎÊÌâ¡£
MySqlÖÐÖ»ÓÐÖ»ÓÐInnoDBÀàÐÍÖ§³ÖÍâ¼ü£¬ËùÒÔÔÚ½¨±íµÄʱºòÓ¦¸Ã°Ñ±íµÄÀàÐÍÉèÖóÉInnoDBÀàÐ͵ģ¬È磺
create table county (
countynumber integer not null auto_increment,
countyname varchar(32),
state varchar(32),
primary key(countynumber)
)type=innodb;
Ïà¹ØÎÊ´ð£º
ÏÈÉÏ´íÎó
ÎÞ·¨Áª½ÓÊý¾Ý¿â
java.sql.SQLException: Before start of result set
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:910)
at com.mysql.jdbc.ResultSet.checkRowPos(ResultSet.java: ......
ÇëÎÊ
Ìí¼ÓÐÂÊý¾ÝÔ´->Êý¾Ý¿â->Ìí¼ÓÁ¬½Ó
Õâ¸ö½çÃæÏ£¬Êý¾ÝÔ´Ñ¡Ôñ£ºMicrosoft SQL Server (SqlClient)£»
·þÎñÆ÷Ãû£º
Ó¦¸ÃдʲôÄØ£¿
ÓÐËÖªµÀ£¿¶àл¸÷λ£¡£¡
Äãµ½µ×ÊÇÒªÁ¬mysql»¹ÊÇmssql£¿
ÒýÓÃ
ÇëÎÊ
......
String sqlCount="select count(*) from usertable where username='"+
userName+"'";Õâ¾ä»° ʲôÒâ˼°¡£¡
Õâ¾ä»°Êä³ö³öÀ´¾ÍÊÇ
select count(*) from usertable where username='ÄãµÄ±äÁ¿ ......
1¡¢ÊDz»ÊÇPHPÖÐÖ»ÄÜʹÓÃmysql_query("update user_aa set money=money2-".$bpanmm." where uid=".$userppp);¸üÐÂÊý¾Ý£¿£¿£¿
2¡¢PHP¸üÐÂmysql_fetch_row($res)Óëmysql_fetch_array($res)ÖеÄÊý¾ ......
ÎÒÊǸöÐÂÊÖ£¬Íû¸ßÊÖ½â´ð
ÎÒÏÖÔÚÒѾ°²×°ÁËmysql£¬Ò²ÓÐmysqlµÄjdbc¡£µ«ÎÒÔõôÅäÖú󣬲ÅÄÜÔÚMyEclipseÀï²Ù×÷mysqlÄØ£¿Çë¸ßÊÖ˵Ïêϸµã
´ò¿ªMyeclipse----window---open perspective---MyEclipse database explorer-- ......