ÉèΪÊ×Ò³ ¼ÓÈëÊÕ²Ø

TOP

MySQLÐÂÊÖÈëÃÅÖ¸ÄÏ(¶þ)
2014-11-24 01:19:15 À´Ô´: ×÷Õß: ¡¾´ó ÖРС¡¿ ä¯ÀÀ:14´Î
Tags£ºMySQL ÐÂÊÖÈëÃÅ Ö¸ÄÏ
d (0.00 sec)

¡¡¡¡5£®Áгö±íÇåµ¥

¡¡¡¡mysql>show tables;

¡¡¡¡Tables in database01

¡¡¡¡Table01

¡¡¡¡table02

¡¡¡¡6£®Áгö±íÖеÄ×Ö¶ÎÇåµ¥

¡¡¡¡mysql>show columns from table01;

¡¡¡¡Field Type Null Key Default Extra

¡¡¡¡field01 int(11) YES

¡¡¡¡field02 char(10) YES

¡¡¡¡7£®±íµÄÊý¾ÝÌîд

¡¡¡¡²åÈëÊý¾Ý

¡¡¡¡mysql>insert into table01 (field01, field02) values (1, first);

¡¡¡¡Query OK, 1 row affected (0.00 sec)

¡¡¡¡8£®×ֶεÄÔö¼Ó

¡¡¡¡...Ò»´ÎÒ»¸ö×Ö¶Î

¡¡¡¡mysql>alter table table01 add column field03 char(20);

¡¡¡¡Query OK, l row affected (0.04 sec)

¡¡¡¡Records: 1 Duplicates: 0 Warnings: 0

¡¡¡¡...Ò»´Î¶à¸ö×Ö¶Î

¡¡¡¡mysql>alter table table01 add column field04 date, add column field05 time;

¡¡¡¡Query OK, l row affected (0.04 sec)

¡¡¡¡Records: 1 Duplicates: 0 Warnings: 0

¡¡¡¡×¢Ò⣺ÿһÁж¼±ØÐëÒÔ"add column"ÖØÐ¿ªÊ¼¡£

¡¡¡¡ËüÔËÐÐÁËÂð£¿ÈÃÎÒÃÇ¿´¿´¡£

¡¡¡¡mysql>select * from table01;

¡¡¡¡field01 field02 field03 field04 field05

¡¡¡¡1 first NULL NULL NULL

¡¡¡¡¶þ¡¢MySQLʹÓõ¼Òý


¡¡¡¡1£®ÔËÓÃMySQL½¨Á¢ÐÂÊý¾Ý¿â


¡¡¡¡ÔÚshellÏÂÔËÐУº


¡¡¡¡¡ç>mysqladmin create database01


¡¡¡¡Database "database01" created.


¡¡¡¡2£®Æô¶¯MySQL


¡¡¡¡ÔÚshellÏÂÔËÐУº


¡¡¡¡¡ç>mysql


¡¡¡¡Welcome to the MySQL monitor. Commands end with ; or g.


¡¡¡¡Your MySQL connection id is 22 to server version: 3.21. 29a-gamma-debug


¡¡¡¡Type help for help.


¡¡¡¡3£®¸ü»»Êý¾Ý¿â


¡¡¡¡mysql>use database01


¡¡¡¡database changed.


¡¡¡¡4£®´´½¨±í


¡¡¡¡mysql>create table table01 (field01 integer, field02 char(10));


¡¡¡¡Query OK, 0 rows affected (0.00 sec)


¡¡¡¡5£®Áгö±íÇåµ¥


¡¡¡¡mysql>show tables;


¡¡¡¡Tables in

Ê×Ò³ ÉÏÒ»Ò³ 1 2 ÏÂÒ»Ò³ βҳ 2/2/2
¡¾´ó ÖРС¡¿¡¾´òÓ¡¡¿ ¡¾·±Ìå¡¿¡¾Í¶¸å¡¿¡¾Êղء¿ ¡¾ÍƼö¡¿¡¾¾Ù±¨¡¿¡¾ÆÀÂÛ¡¿ ¡¾¹Ø±Õ¡¿ ¡¾·µ»Ø¶¥²¿¡¿
·ÖÏíµ½: 
ÉÏһƪ£ºMysqlÊý¾Ý¿âÓÅ»¯Ñ§Ï°Ö®Èý¨DË÷ÒýÓ.. ÏÂһƪ£ºÇáËÉÕÆÎÕÈçºÎ±£»¤MySQLÖеÄÖØÒªÊý..

ÆÀÂÛ

ÕÊ¡¡¡¡ºÅ: ÃÜÂë: (ÐÂÓû§×¢²á)
Ñé Ö¤ Âë:
±í¡¡¡¡Çé:
ÄÚ¡¡¡¡ÈÝ: