mysql±íµÄ¸´ÖÆ
1.¸´ÖƱí½á¹¹¼°Êý¾Ýµ½Ð±í
CREATE TABLE бí SELECT * from ¾É±í
2.Ö»¸´ÖƱí½á¹¹µ½Ð±í
CREATE TABLE бí SELECT * from ¾É±í WHERE 1=2
»òCREATE TABLE бí LIKE ¾É±í
3.¸´ÖƾɱíµÄÊý¾Ýµ½Ð±í(¼ÙÉèÁ½¸ö±í½á¹¹Ò»Ñù)
INSERT INTO бí SELECT * from ¾É±í
4.¸´ÖƾɱíµÄÊý¾Ýµ½Ð±í(¼ÙÉèÁ½¸ö±í½á¹¹²»Ò»Ñù)
INSERT INTO бí(×Ö¶Î1,×Ö¶Î2,.......) SELECT ×Ö¶Î1,×Ö¶Î2,...... from ¾É±í
5.¿ÉÒÔ½«±í1½á¹¹¸´ÖƵ½±í2
SELECT * INTO ±í2 from ±í1 WHERE 1=2
6.¿ÉÒÔ½«±í1ÄÚÈÝÈ«²¿¸´ÖƵ½±í2
ÓÃSELECT * INTO ±í2 from ±í1
¶ÔÓÚ·½·¨Ò»
create table newtable1 select name,email,tel,address from dept1;
¸Ã·½·¨Êǽ«Ò»ÕűíµÄÊý¾Ý¸´ÖƵ½Ò»ÕÅбíµÄ·½·¨£»
ÏÖÔÚÎÊÌâÊÇnewtable1бíÖÐÈçºÎ½¨Á¢Ò»¸ö×Ô¶¯Ôö³¤µÄÁУ¬ÔÚ¸´ÖÆÊý¾ÝµÄͬʱ£¬¸Ã×Ô¶¯Ôö³¤ÁÐÒ²»á×Ô¶¯Ôö³¤¡£
CREATE TABLE test (id int not null auto_increment) SELECT * from dept1;
Ïà¹ØÎĵµ£º
1.´´½¨±í£º
create table groupTable(dept varchar(6),phone varchar(20),amount int);
2.²åÈë²âÊÔÊý¾Ý£º
insert groupTable
select 'ÓªÒµ²¿',8001,20 union all
select 'ÓªÒµ²¿',8002,30 union all
se ......
×öÈí¼þÊý¾Ý¿â±Ø²»¿ÉÉÙ£¬ÎÒÑ¡ÔñÁËMySQL¡£
Ê×Ïȵ½http://dev.mysql.com/downloads/ÏÂÔغÃMySQL5.1ºÍMySQL GUI TOOLS
ϵ½µçÄÔÉÏ,È»ºó°²×°£¬ÏÈ×°5.1ÔÙ×°gui tools ,һ·ȷ¶¨°É¡£
ŪºÃºó£¬µã¿ªMySQL Query Browser£¬¾Í¿ÉÒÔ²Ù×÷Êý¾Ý¿âÁË¡£
MySQLµÄÇý¶¯³ÌÐòÊÇGUITOOLS°²×°Ä¿Â¼/java/libϵÄmysql-connector-java-5.0.4-bin.ja ......
×î½üÓöµ½Ò»¸öÐèÇóÒªÔÚlinuxÏÂÓÃjava µ÷ÓÃmysql¿Í»§¶ËÔ¶³ÌµÇ½mysql·þÎñÆ÷£¬´Ó¿Í»§¶Ë»úÆ÷µ¼Èëmysql½Å±¾£¬´Ómysql·þÎñÆ÷¶Ëµ¼³ö±íÖеÄÊý¾Ý¡£ÒÔÏÂÊÇÓõ½µÄÖ÷Òª·½·¨£º
Java ´úÂë
/**
* µ¼ÈëÊý¾Ý
* @param ½Å±¾µÄµØÖ·ºÍÃû³Æ
* @return ÊÇ·ñ³ ......
ÎÒÔÚ°²×°XAMPP 1.7.0ʱ£¬°²×°³É¹¦ºó£¬´òËãÆô¶¯XAMPP¡£Apache˳ÀûÆô¶¯£¬µ«ÊÇMySqlÔõô¶¼Æô¶¯²»ÁË£¬ÌáʾµÄ´íÎóÊÇ£º
error:mysql service not started [-1]
ÎÒÖØÐÂ×°Á˼¸´Î¶¼²»ÐУ¬ÏÂÔØÁËÆäËûµÄ°æ±¾Ò²²»ÐУ¬ÎÒÕæ¸ã²»Çå³þΪʲô¡£ÎÒGoogleÁË°ëÌ죬ÆðÏÈʱÖÐÎÄÍøÒ³£¬°´ÕÕ¼¸¸ö½â¾ö·½·¨×öÁ˶¼²»ÐУ¬¿Ï¶¨ÊÇûÓжÔÖ¢ÏÂÒ©°Ñ£¬È»ºóÎÒµ ......
MySql ×Ö·û´®º¯Êý
[ 2006-04-22 19:24:44 | Author: Ychon ]
Font Size: Large | Medium | Small
¶ÔÓÚÕë¶Ô×Ö·û´®Î»ÖõIJÙ×÷£¬µÚÒ»¸öλÖñ»±ê¼ÇΪ1¡£
ASCII(str)
·µ»Ø×Ö·û´®strµÄ×î×óÃæ×Ö·ûµÄASCII´úÂëÖµ¡£Èç¹ûstrÊÇ¿Õ×Ö·û´®£¬·µ»Ø0¡£Èç¹ûstrÊÇNULL£¬·µ»ØNULL¡£
mysql> select ASCII('2');
-> 50
mysql ......