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