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

Mysql ¸´ÖÆ±í¼°½á¹¹

Ò»¡¢CREATE TABLE ·½·¨
Õû±í¸´ÖÆ # create table бí select * from ¾É±í;
½á¹¹¸´ÖÆ # create table бí select * from ¾É±í where 1<>1;
¶þ¡¢INSERT INTO ·½·¨
µÃµ½½¨±íÓï¾ä # show create table ¾É±í;
н¨±í
¸´ÖÆÊý¾Ýµ½Ð±í INSERT INTO new_table(col1,col2,...) (SELECT col1,col2,... from old_table);


Ïà¹ØÎĵµ£º

excelÊý¾ÝÅúÁ¿µ¼Èëµ½MysqlÊý¾Ý¿â

aspxÒ³Ãæ
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="customin.aspx.cs" Inherits="kf_customin" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" ......

mysql»ù±¾Ó÷¨

http://dev.mysql.com/doc/refman/5.1/zh/index.html
(MySql 5.1 ÖÐÎIJο¼ÊÖ²á)
*------------------------------------------------------------------------------------------
show databases; ÏÔʾÊý¾Ý¿â
drop database Êý¾Ý¿âÃû;ɾ³ýÊý¾Ý¿â
set names 'utf8';ÉèÖÃÊý¾Ý¿â±àÂëΪutf-8
source x:\Êý¾Ý¿âÃû.sql;µ¼È ......

MySqlµÄ±íÀàÐÍ

create database sample;
create table 't_user' (
    'id' int(11) not null auto_increment,
    'name' varchar(100) not null default '',
    primary key ('id')
) type=myisam;
Ñ¡ÏîÖ»ÔÚMySQL 3.23ºÍÒÔºó°æ±¾Öб»ÊµÏÖ¡£
²»Í¬µÄ±íÀàÐÍÊÇ£º
ISAM Ô­À´µÄ±í´¦ÀíÆ ......

SpringÅäÖÃmysqlÊý¾Ý¿â


<! -- beans ÔªËØÊÇSpringÅäÖÃÎļþµÄ¸ùÔªËØ£¬ËùÓеÄSpring µÄÅäÖÃÎļþ¶¼Ó¦°´ÈçϽṹÊéдһ¡µ
<beans>
<!Ò»ÅäÖÃid ΪdataSource µÄbean£¬¸Ãbean ÊǸöÊý¾ÝԴʵÀýÒ»¡µ
<bean ¹¤d="dataSource" class="org.apache.corrunons.dbcp.BasicDataSource"
destroy-method="close">
<! È·¶¨Êý¾ÝÔ´µÄÇ ......

mySQL¼òµ¥´´½¨Êý¾Ý¿â¡¢±í¡¢¸Ä±äÊý¾Ý¿â·¾¶

´´½¨Êý¾Ý¿â£º
mysql>create database test;
Query OK, 1 row affected (0.02 sec)
´´½¨Êý¾Ý¿â±í£º
mysql>use test;
Database changed
´´½¨Êý¾Ý¿â±í£º
myaql>create table user(SID VARCHAR(11), name VARCHAT(6) );
Query OK, 0 rows affected (0.08 sec)
²åÈë¼Ç¼£º
mysql>insert int use ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ