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

mysql ³£ÓþÙÀý

drop table student;
create table student
(sno   int   not null unique,
 sname varchar(8) not null,
 ssex  char(2)    not null,
 sage int ,
 sdept varchar(20));
 
 select * from student;
 alter table student drop unique(sno);
 alter table student modify sno primary key;
 alter table student add constraints con_s check(ssex in('F', 'M'));
 
 insert into  student values ('0001', 'zhangwen', 'F', 24, 'math');
 insert into  student values ('0201', 'zhangzi', 'F', 24, 'jsj');
 insert into  student values ('0002', 'wangjing', 'M', 22, 'math');
 insert into  student values ('0301', 'lilu', 'M', 23, 'wuli');
 insert into  student values ('0003', 'wujun', 'M', 24, 'math');
 insert into  student values ('0202', 'wangli', 'F', 23, 'jsj');
 insert into  student values ('0203', 'jiangmin', 'M', 23, 'jsj');
 insert into  student values ('0302', 'lixiang', 'F', 23, 'wuli');
 insert into  student values ('0303', 'jinmin', 'F', 24, 'wuli');
 insert into  student values ('0304', 'jinmin', 'F', null, 'wuli');
 insert into  student values ('0204', 'jinmin', 'F', 22, '');
 delete from student where sno = '0204';
 update student set sname = 'luyong' where sno = '0304';
 insert into student values('0004','meinv','M',22,'math');
 insert into student values('0006','beauty','M',21,'math');
 ----------------------------------------------
 drop table course;
 create table course(cno int primary key,
                     cname varchar2(10) not null,
                     ccredite float(2));
        


Ïà¹ØÎĵµ£º

MySQLÊÂÎñ´¦Àí

START TRANSACTION, COMMITºÍROLLBACKÓï·¨
START TRANSACTION | BEGIN [WORK]
COMMIT [WORK] [AND [NO] CHAIN] [[NO] RELEASE]
ROLLBACK [WORK] [AND [NO] CHAIN] [[NO] RELEASE]
SET AUTOCOMMIT = {0 | 1}
START
TRANSACTION»òBEGINÓï¾ä¿ÉÒÔ¿ªÊ¼Ò»ÏîеÄÊÂÎñ¡£COMMIT¿ÉÒÔÌá½»µ±Ç°ÊÂÎñ£¬ÊDZä¸ü³ÉΪÓÀ¾Ã±ä¸ü¡£ROLLBACK ......

ÐÞ¸Äͨ´ïOA MysqlÊý¾Ý¿âÃÜÂë


ÓеÄÓû§£¬³öÓÚʹÓÃmysqlÊý¾Ý¿â¿ª·¢ÆäËû³ÌÐòµÄÐèÒª£¬¿ÉÄÜÏ£ÍûÐÞ¸ÄMysqlÊý¾Ý¿âµÄrootÓû§ÃÜÂ룬
ÏÖ×öÒÔϼòҪ˵Ã÷¡£
ÓÉÓÚOAʹÓõÄMysqlÊý¾Ý¿â±»É趨ΪֻÄÜ´Ó±¾»ú·ÃÎÊ£¬ËùÒÔÆÕͨÓû§²»½¨ÒéÐÞ¸ÄÊý¾Ý¿âÃÜÂ룬
ÐÞ¸ÄÊý¾Ý¿âÃÜÂë²¢²»ÊÇΪÁ˸ÄÉÆÏµÍ³°²È«ÐÔµÄÄ¿µÄ¡£
windows-¡µ¿ªÊ¼—¡µÔËÐУ¬ÊäÈëcmd½øÈëÃüÁîÐÐģʽ£¬²¢Ê¹Ó ......

MySQLÊý¾Ý¿âÎļþ½éÉÜ

±¾ÎÄÁ´½Óhttp://www.chysoft.net/files/article_234.htm ¸ü¶à×ÊѶÇë½øÈëwww.chysoft.net 
mysqlµÄÊý¾Ý´¢´æÄ¿Â¼ÔÚmysqlµÄÅäÖÃÎļþmy.iniÎļþÉèÖ㬸ñʽÈçÏ£º
# Uncomment the following rows if you move the MySQL distribution to another
# location
basedir = d:/cyoa/mysql_cy/
datadir = d:/cyoa/mysq ......

¹ØÓÚmysqlµÄ¾Û¼¯Ë÷Òý

·­Ò룺
InnoDB±í»á°üº¬Ò»¸ö¾Û¼¯Ë÷Òý£¨Êý¾Ý±íµÄÎïÀí´æ´¢Ë³ÐòºÍ±íµÄÂß¼­´æ´¢Ë³ÐòÒ»Ö£©
Ò»°ãÊǰ´ÕÕÏÂÃæµÄ¹æÔòÀ´É趨¾Û¼¯Ë÷ÒýµÄ£º
1£¬¼ÙÈç±í°üº¬PRIMARY KEY£¬InnoDBʹÓÃËü×÷Ϊ¾Û¼¯Ë÷Òý
2£¬¼ÙÈç±íûÓж¨ÒåPRIMARY KEY£¬InnoDB½«µÚÒ»¸öÖ»°üº¬NOT NULLÊôÐÔÁеÄUNIQUE index×÷ΪÖ÷¼ü²¢ÇÒ½«ËüÉèÖÃΪ¾Û¼¯Ë÷Òý
3£¬Ç°Á½Õß¶¼²»Âú× ......

MysqlµÄ´æ´¢ÒýÇæ


<!--
/* Font Definitions */
@font-face
{font-family:ËÎÌå;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:SimSun;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:"\@ËÎÌå" ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ