Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

¡¾MySQLÊý¾ÝÀàÐÍ1Ö® ÊýÖµÀàÐÍ¡¿


MySQL»ù±¾ÊýÖµÀàÐÍ´óÖ¿ÉÒԷֳɣº
ÕûÊýÀàÐÍ£ºTINYINT¡¢SAMLLINT¡¢MEDIUMINT¡¢INT¡¢BIGINT--1×Ö½Ú¡¢2¡¢3.¡¢4¡¢8
¸¡µãÊýÀàÐÍ£ºFLOAT(m,d)¡¢DOUBLE(m,d)==REAL-4×Ö½Ú¡¢8
¶¨µãÊýÀàÐÍ£ºDECIMAL(m,d)¡¢NUMERIC-m+2×Ö½Ú¡¢8
λÀàÐÍ£ºBIT(m)-1-8×Ö½Ú
¸÷¸öÀàÐ͵ÄÏêϸ·¶Î§¿ÉÒԲο¼mysqlÎĵµ
 
 
Êý¾ÝÀàÐÍСÀý£º
1.ÕûÊýÀàÐÍ
create table t1
(
  id int,
  id2 int(4)
);
insert t1 select 1,2;
select * from t1;
+------+------+
| id   | id2  |
+------+------+
|    1 |    2 |
+------+------+
alter table t1 modify id int zerofill;
alter table t1 modify id2(4) int zerofill;
select * from t1;
+------------+------------+
| id         | id2        |
+------------+------------+
| 0000000001 | 0002      |
+------------+------------+
insert t1 select 1,11111;
Select * from t1;
+------------+------------+
| id         | id2        |
+------------+------------+
| 0000000001 | 0002 |
| 0000000001 | 11111 |
+------------+------------+
insert t1 select -1,-2;
+-------+------+---------------------------------------------+
| Level | Code | Message                                     |
+-------+------+---------------------------------------------+
| Error | 1264 | Out of range value 


Ïà¹ØÎĵµ£º

WindowsÏ»·¾³±äÁ¿Ð޸ģ¨Éæ¼°MySQLÃüÁîµÄÖ±½ÓÔËÐУ©


ÓÒ¼üÎҵĵçÄÔ->ÊôÐÔ->¸ß¼¶->»·¾³±äÁ¿
¿ÉÒÔ¿´µ½ÓÐÓû§±äÁ¿ºÍϵͳ±äÁ¿
ÔÚÕâÀïÎÒÃÇ¿ÉÒÔ½øÐÐÐ޸Ļ·¾³±äÁ¿
±ÈÈç˵ÎÒÃÇ°²×°ÁËMySQL·þÎñÆ÷£¬Ïë½øÈëMySQLµÄÃüÁîÐеĻ°¾Í±ØÐëÔËÐÐcmd
Èç¹ûûÓÐÉèÖû·¾³±äÁ¿µÄ»°ÎÒÃDZØÐë½øÈëMySQLµÄ°²×°Â·¾¶²ÅÄÜʹÓÃmysql -u root -pÕâ¸öÃüÁî
ÕâÑù»á¸øÎÒÃÇ´øÀ´ºÜ¶àÂé·³£¬ÕâʱºòÎÒÃÇÏëÔ ......

Mysql ѧϰ ³£ÓÃÃüÁî


1Â¥



Ò»¡¢Á¬½ÓMYSQL¡£
¸ñʽ£º mysql -hÖ÷»úµØÖ· -uÓû§Ãû £­pÓû§ÃÜÂë
1¡¢Á¬½Óµ½±¾»úÉϵÄMYSQL¡£
Ê×ÏÈ´ò¿ªDOS´°¿Ú£¬È»ºó½øÈëĿ¼mysql\bin£¬ÔÙ¼üÈëÃüÁîmysql -u root -p£¬»Ø³µºóÌáʾÄãÊäÃÜÂë.×¢ÒâÓû§ÃûÇ°¿ÉÒÔÓпոñÒ²¿ÉÒÔûÓпոñ£¬µ«ÊÇÃÜÂëÇ°±ØÐëÃ»Ó ......

´ò¿ªmysqlÔ¶³Ì·ÃÎÊȨÏÞ


2009-05-05
´ò¿ªMySQLÔ¶³Ì·ÃÎÊȨÏÞ
¹Ø¼ü×Ö: mysql
1¡¢¸Ä±í·¨
¡¡¡¡¿ÉÄÜÊÇÄãµÄÕʺŲ»ÔÊÐí´ÓÔ¶³ÌµÇ½£¬Ö»ÄÜÔÚlocalhost¡£Õâ¸öʱºòÖ»ÒªÔÚlocalhostµÄÄÇ̨µçÄÔ£¬µÇÈëmysqlºó£¬¸ü¸Ä "mysql" Êý¾Ý¿âÀïµÄ "user" ±íÀïµÄ "host" Ï´Ó"localhost"¸Ä³Æ"%"
¡¡¡¡mysql -u root -p
mysql>use mysql;
¡¡¡¡mysql>upda ......

VCÓÃMYSQLÌṩµÄLIB²éѯÊý¾Ý¿â

#include "winsock.h"
#include "mysql.h"
void query_example(void)
{
MYSQL *pDbCon = NULL;
char *pszHost = "localhost";
char *pszUser = "guest";
char *pszPsw = "";
char *pszDbName = "mysql_db_name";
int iPort = 3306;
pDbCon = mysql_init((MYSQL*) 0);
if (NULL != pDbCon)
{ ......

MySQL EVENT


MySQL EVENT 
À´Ô´£ºhttp://samyu.blog.51cto.com/344284/146011
event_scheduler:
The MySQL event scheduler is a thread that runs in the background looking for events to execute. It spends a lot of time sleeping -- and won't do anything unless the new global variable "event_scheduler" is set t ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ