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

mysqlµ¼ÈësqlÎļþ:Mysqlµ¼Èëµ¼³ö.sqlÎļþ

mysqlµ¼ÈësqlÎļþ:Mysqlµ¼Èëµ¼³ö.sqlÎļþ
²½ÖèÈçÏ£º
Ò».MYSQLµÄÃüÁîÐÐģʽµÄÉèÖãº
×ÀÃæ->ÎҵĵçÄÔ->ÊôÐÔ->»·¾³±äÁ¿->н¨->
PATH=“£»path\mysql\bin;”ÆäÖÐpathΪMYSQLµÄ°²×°Â·¾¶¡£
¶þ.¼òµ¥µÄ½éÉÜÒ»ÏÂÃüÁîÐнøÈëMYSQLµÄ·½·¨£º
1.C:\>mysql -h hostname -u username -p
°´ENTER¼ü£¬µÈ´ýÈ»ºóÊäÈëÃÜÂë¡£ÕâÀïhostnameΪ·þÎñÆ÷µÄÃû³Æ£¬Èçlocalhost£¬usernameΪMYSQLµÄÓû§Ãû£¬Èçroot¡£
½øÈëÃüÁîÐкó¿ÉÒÔÖ±½Ó²Ù×÷MYSQLÁË¡£
2.¼òµ¥½éÉÜÒ»ÏÂMYSQLÃüÁ
mysql->CREATE DATABASE dbname;//´´½¨Êý¾Ý¿â
mysql->CREATE TABLE tablename;//´´½¨±í
mysql->SHOW DATABASES;//ÏÔʾÊý¾Ý¿âÐÅÏ¢£¬ÓÐÄÇЩ¿ÉÓõÄÊý¾Ý¿â¡£
mysql->USE dbname;//Ñ¡ÔñÊý¾Ý¿â
mysql->SHOW TABLES;//ÏÔʾ±íÐÅÏ¢£¬ÓÐÄÇЩ¿ÉÓõıí
mysql->DESCRIBE tablename;//ÏÔʾ´´½¨µÄ±íµÄÐÅÏ¢
Èý.´ÓÊý¾Ý¿âµ¼³öÊý¾Ý¿âÎļþ£º
1.½«Êý¾Ý¿âmydbµ¼³öµ½e:\mysql\mydb.sqlÎļþÖУº
´ò¿ª¿ªÊ¼->ÔËÐÐ->ÊäÈëcmd ½øÈëÃüÁîÐÐģʽ
c:\>mysqldump -h localhost -u root -p mydb >e:\mysql\mydb.sql
È»ºóÊäÈëÃÜÂ룬µÈ´ýÒ»»áµ¼³ö¾Í³É¹¦ÁË£¬¿ÉÒÔµ½Ä¿±êÎļþÖмì²éÊÇ·ñ³É¹¦¡£
2.½«Êý¾Ý¿âmydbÖеÄmytableµ¼³öµ½e:\mysql\mytable.sqlÎļþÖУº
c:\>mysqldump -h localhost -u root -p mydb mytable>e:\mysql\mytable.sql
3.½«Êý¾Ý¿âmydbµÄ½á¹¹µ¼³öµ½e:\mysql\mydb_stru.sqlÎļþÖУº
c:\>mysqldump -h localhost -u root -p mydb --add-drop-table >e:\mysql\mydb_stru.sql
//-h localhost¿ÉÒÔÊ¡ÂÔ£¬ÆäÒ»°ãÔÚÐéÄâÖ÷»úÉÏÓÃ
ËÄ.´ÓÍⲿÎļþµ¼ÈëÊý¾Ýµ½Êý¾Ý¿âÖУº
´Óe:\mysql\mydb2.sqlÖн«ÎļþÖеÄSQLÓï¾äµ¼ÈëÊý¾Ý¿âÖУº
1.´ÓÃüÁîÐнøÈëmysql£¬È»ºóÓÃÃüÁîCREATE DATABASE mydb2;´´½¨Êý¾Ý¿âmydb2¡£
2.Í˳ömysql ¿ÉÒÔÊäÈëÃüÁîexit£»»òÕßquit£»
3.ÔÚCMDÖÐÊäÈëÏÂÁÐÃüÁ
c:\>mysql -h localhost -u root -p mydb2 < e:\mysql\mydb2.sql
È»ºóÊäÈëÃÜÂ룬¾ÍOKÁË¡£
Îå.ÏÂÃæ̸һϹØÓÚµ¼ÈëÎļþ´óСÏÞÖÆÎÊÌâµÄ½â¾ö£º
ĬÈÏÇé¿öÏ£ºmysql ¶Ôµ¼ÈëÎļþ´óСÓÐÏÞÖƵģ¬×î´óΪ2M£¬ËùÒÔµ±ÎļþºÜ´óʱºò£¬Ö±½ÓÎÞ·¨µ¼È룬ÏÂÃæ¾ÍÕâ¸öÎÊÌâµÄ½â¾öÁоÙÈçÏ£º
1.ÔÚphp.iniÖÐÐÞ¸ÄÏà¹Ø²ÎÊý£º
Ó°Ïìmysqlµ¼ÈëÎļþ´óСµÄ²ÎÊýÓÐÈý¸ö£º
memory_limit=128M,upload_max_filesize=2M,post_max_size=8M
ÐÞ¸Äupload_


Ïà¹ØÎĵµ£º

ORACLEºÍSQLÓï·¨Çø±ð¹éÄÉ

¹Ø¼ü×Ö: oracle & sql server
Êý¾ÝÀàÐͱȽÏ
ÀàÐÍÃû³Æ
Oracle
SQLServer
±È½Ï
×Ö·ûÊý¾ÝÀàÐÍ CHAR CHAR ¶¼Êǹ̶¨³¤¶È×Ö·û×ÊÁϵ«oracleÀïÃæ×î´ó¶ÈΪ2kb£¬SQLServerÀïÃæ×î´ó³¤¶ÈΪ8kb
±ä³¤×Ö·ûÊý¾ÝÀàÐÍ VARCHAR2 VARCHAR OracleÀïÃæ×î´ó³¤¶ÈΪ4kb£¬SQLServerÀïÃæ×î´ó³¤¶ÈΪ8kb
¸ù¾Ý×Ö·û¼¯¶ø¶¨µÄ¹Ì¶¨³¤¶È×Ö· ......

³£ÓõÄORACLE PL/SQL¹ÜÀíÃüÁîÒ»

Ô­ÎÄ£ºÁõÎä| ³£ÓõÄORACLE PL/SQL¹ÜÀíÃüÁîÒ»
ÊìϤORACLE¹ÜÀíµÄÒ»¶¨¶ÔÕâЩÃüÁî²»»áÄ°Éú£¬²»¹ý¶ÔÓÚÎÒÕâ¸ö¸Õ½Ó´¥ORACLE¹ÜÀíµÄÀ´Ëµ£¬»¹ÊÇÓбØÒª×öϼǼ£¬ÒÔ±ãËæʱ²é¿´¡£
Ò» µÇ¼SQLPLUS
sqlplus Óû§Ãû/ÃÜÂë@Êý¾Ý¿âʵÀý as µÇ¼½ÇÉ«;
Èç:Óû§sys(ÃÜÂëΪ123)ÒÔsysdbaµÄ½ÇÉ«µÇ¼Êý¾Ý¿âORACL£¬ÎÒÃÇ¿ÉÒÔÊäÈ룺sqlplus sy ......

ÅúÁ¿Éú³ÉͬÀàÐÍsqlÓï¾äµÄ½Å±¾

--ÔÚÈÕ³£Î¬»¤£¬¿ª·¢Öг£Óöµ½Ð´Ò»ÏµÁнṹÀàÐ͵ÄsqlÓï¾ä£¬ºÜ·³ºÜÀÛÆäʵ¿ÉÒÔ
--ÀûÓÃSQL*PLUS»·¾³ÃüÁî  Éú³É½Å±¾Îļþ
        set heading off   --¹Ø±ÕÁеıêÌâ
        set feedback off  --¹Ø±Õ·´À¡ÐÅÏ¢
    ......

SQLÖÐûÓü¯ºÏµÄminus,ÓÃunionʵÏÖ

ÁгöTableAÖÐÓеĶøTableBÖÐûÓÐ, ÒÔ¼°BÖÐÓжøAÖÐûÓеļǼ£º
ÆäÖÐÁ½¸ö±íµÄ½á¹¹Ïàͬ£¬Ñ¡ÔñµÄKey¿ÉÒÔ¶à¸ö
Select Key from
( select * from TableA
Union select * from TableB
)
group by Key
having count(Key)=1

ÁгöTableAÖÐÓеĶøTableBÖÐûÓеļǼ£º
Select Key from
( (select * from TableA
Un ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ