ÔÚmysqlÖÐÖ´ÐÐsqlÎļþ£¨Èçtest.sql£©µÄ³£Ó÷½·¨
ÔÚmysqlÖÐÖ´ÐÐsqlÎļþ£¨Èçtest.sql£©µÄ³£Ó÷½·¨
ΪÁË·½±ã£¬¿ÉÒÔ½«mysqlµÄ°²×°Â·¾¶ÏÂbinĿ¼µÄµØÖ··Åµ½»·¾³±äÁ¿PATHÖУ¬Èç;C:\Program Files\MySQL\MySQL Server 5.0\bin¡£ÕâÑùÔÚÈÎÒâλÖôò¿ªµÄÃüÁîÐгÌÐò¶¼ÄÜÕÒµ½mysql.exe¡£
¿ÉÒÔ´ò¿ªmysqlÃüÁîÐУ¬Ò²¿ÉÒÔÔÚÃüÁîÐÐÖÐͨ¹ýmysql -u root -p mydatabaseÀ´µÇ¼mysql¡£µÇ¼ºó£¬ÔÚmysqlÌáʾ·ûÏ£¬Ê¹ÓÃsourceÃüÁîÈçsource D:/sql/test.sqlÖ´ÐÐsqlÓï¾ä¡£
ÁíÍ⣬Çл»Êý¾Ý¿âµÄÃüÁîΪuse£¬Èçuse mydatabase;
Ïà¹ØÎĵµ£º
Private Sub insert1_click()
Dim iCount As Integer
Dim cn
Set cn = CreateObject("ADODB.Connection")
cn.ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Password=8233;Initial Catalog=hskmis;Data Source=127.0.0.1"
cn.Open
cn.Execute ("delete temp9")
'¼ÆËã¸Ã±íÓжàÉÙÐ ......
»ñÈ¡¡¢Ôö¼Ó¡¢Ð޸ġ¢É¾³ýsqlserver×Ö¶ÎÃèÊö
Select o.name AS tableName, c.name AS columnName, p.[value] AS Description
from sysproperties p INNER JOIN
sysobjects o ON o.id = p.id INNER JOIN
syscolumn ......
ÒªÔÚSQL ServerÊý¾Ý¿âÖд洢m³²¢´òÓ¡³öÀ´, ·½·¨ÈçÏ£º
1£©½«Êý¾Ý¿âÖÐÏàÓ¦×ֶεÄÊý¾ÝÀàÐÍÉèΪnchar»ònvarcharÀàÐÍ¡£
2£©´ÓExcelÖеõ½m³£¬¸´ÖÆÕ³Ìùµ½½ÓÊÕÊý¾ÝµÄ¿Ø¼þÖУ¨TextBox¡¢DataGridViewµÈ£©¡£±£´æ¼´¿É¡£
×¢£º1£©nchar,nvarcharÓëchar,varcharµ ......
Sql³£¼ûÃæÊÔÌ⣨×ܽᣩ
0.ÈçºÎɾ³ýÒ»¸öÓµÓбȽ϶àµÄÊý¾ÝµÄ±í
Èç¹û¸Ã±íËùÔÚµÄÊý¾Ý¿âÓµÓнÏÉÙµÄ±í£¬¿ÉÒÔÏȽ«ÆäÓà±íµ¼³öÈ¥£¬È»ºó·ÖÀëÊý¾Ý¿â£¬ÔÚɾ³ý£¬Ð½¨Ò»¸öͬÃûÊý¾Ý¿â£¬½«ÆäÓà±íÔٴε¼Èë¡£
1.ÓÃÒ»ÌõSQLÓï¾ä ²éѯ³öÿÃſζ¼´óÓÚ80·ÖµÄѧÉúÐÕÃû
name kecheng fenshu
ÕÅÈý ÓïÎÄ &n ......
ÏÂÁÐÓï¾ä²¿·ÖÊÇMssqlÓï¾ä£¬²»¿ÉÒÔÔÚaccessÖÐʹÓá£
SQL·ÖÀࣺ
DDL—Êý¾Ý¶¨ÒåÓïÑÔ(CREATE£¬ALTER£¬DROP£¬DECLARE)
DML—Êý¾Ý²Ù×ÝÓïÑÔ(SELECT£¬DELETE£¬UPDATE£¬INSERT)
DCL—Êý¾Ý¿ØÖÆÓïÑÔ(GRANT£¬REVOKE£¬COMMIT£¬ROLLBACK)
Ê×ÏÈ,¼òÒª½éÉÜ»ù´¡Óï¾ä£º
1¡¢ËµÃ÷£º´´½¨Êý¾Ý¿â
CREATE DATABASE data ......