Á´½Ó·þÎñÆ÷Á´½ÓÓÉMSSQL2005ÖÁMYSQL£¬¿É²é¿´£¬Ð´Èë³ö´í
ʹÓÃÓï¾ä
SELECT * from OPENQUERY(MYSQL10 ,'select area_e_name,area_c_name,code from area' )
¿ÉÒԲ鿴µ½MYSQLÉϵÄÊý¾Ý.µ«Ð´ÈëÊý¾ÝµÄʱºò¾Í±¨´íÁË,Óï¾äÈçÏÂ:
insert openquery(MYSQL10, 'SELECT area_e_name,area_c_name,code from SearchEngineDataBase.dbo.Product_Search ')
select [EnglishText],[ChineseText],[Code] from DataLabelItem
where LabelCode='Province'
±¨´í:
Á´½Ó·þÎñÆ÷"MYSQL10"µÄ OLE DB ·ÃÎÊ½Ó¿Ú "MSDASQL" ·µ»ØÁËÏûÏ¢ "[MySQL][ODBC 5.1 Driver][mysqld-6.0.2-alpha-log]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.area' at line 1"¡£
ÏûÏ¢ 7350£¬¼¶±ð 16£¬×´Ì¬ 2£¬µÚ 1 ÐÐ
ÎÞ·¨´ÓÁ´½Ó·þÎñÆ÷ "MYSQL10" µÄ OLE DB ·ÃÎʽӿÚ"MSDASQL"»ñÈ¡ÁÐÐÅÏ¢¡£
ÇëÎÊ£¬ÊÇ·ñÐèÒªÔÚMYSQL·þÎñÆ÷ÉÏ×öʲôÅäÖã¬Èç¸øȨÏ޵ȣ¬»òÕßMYSQL·þÎñÆ÷ÉÏÐèÒª°²×°Ê²Ã´£¿
SQL code:
SQL code²»Í¬·þÎñÆ÷Êý¾Ý¿âÖ®¼äµÄÊý¾Ý²Ù×÷
--´´½¨Á´½Ó·þÎñÆ÷
exec sp_addlinkedserver 'ITSV ', ' ', 'SQLOLEDB ', 'Ô¶³Ì·þÎñÆ÷Ãû»òipµØÖ· '
exec sp_addlinkedsrvlogin 'ITSV ', 'false ',null, 'Óû§Ãû ', 'ÃÜÂë '
--²éѯʾÀý
select * from ITSV.Êý¾Ý¿âÃû.dbo.±íÃû
--µ¼ÈëʾÀý
select * into ±í from ITSV.Êý¾Ý¿âÃû.dbo.±íÃû
--ÒÔºó²»ÔÙʹÓÃʱɾ³ýÁ´
Ïà¹ØÎÊ´ð£º
ÔÚ°²×°Java±àÒëÆ÷µÄEclipseµÄʱºò£¬¶Ô»·¾³±äÁ¿½øÐÐÁËÅäÖã¬ÔÚ°²×°MySQlµÄʱºòÒ²Òª¶Ô»·¾³±äÁ¿½øÐÐÅäÖã»ÄÇôºóÃæµÄÅäÖûáÓ°ÏìÇ°ÃæµÄEclipseµÄÅäÖÃÂð£¿
Çë´ó¼Ò¶àÖ¸½Ì~£¡Ð»Ð»£¡
²»»á°Ñ£¬ÎÒÕⶼװÁ赀 ÎÒϵͳÀï »¹×°ÁË ......
ÇëÎÊÏÂÄܲ»ÄÜÔÙwindows϶¨ÆÚÇå¿ÕmysqlÒ»¸ö±íÖеÄÈ«²¿Êý¾Ý£¬ÓÃPHPʵÏÖ£¡
лл¸÷λÁË
¾Í±ÈÈçÒ»¸öÐÇÆÚÇå¿ÕÒ»´Î
±ÈÈçÿ¸öÐÇÆÚÁùÁãµãÇå¿ÕÒ»´Î£¡
ллÁË
¼Æ»®ÈÎÎñ...php....sql...truncate....OK
Äã¾ÍÕâ½ÓÔÚҳà ......
String SQL="insert into ѧÉúÐÅÏ¢±í values(StudentNumber,StudentName,StudentAge)";ÆäÖÐStudentNumber,StudentName,StudentAge¶¼ÊDZäÁ¿¡£ÕâÑùд²»¶Ô¡¡µ½µ×¸Ãզд°¡
Íò·Ö¸Ðл£¡
String SQL=&q ......
CREATE DATABASE ADDRESSLIST;
USE ADDRESSLIST;
DROP TABLE IF EXISTS FRIEND;
CREATE TABLE FRIEND
(FRIEND_ID INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY ,
FRIEND_NAME VARCHAR(20) NOT N ......
ÓÐÒ»¸öÊý¾Ý¿âÀïÖ»ÓÐ2WÌõÊý¾Ý²»µ½£¬È´ÓÐ500MÄÇô´ó,Ôõô»ØÊ°¡£¿ÊÇACCESSµÄÊý¾Ý¿â¡£ºóÀ´ÎÒ°ÑACCESSµ¼Èëµ½MSSQLÖУ¬Ò²Õ¼ÓÃÁË500M×óÓҵĿռ䣬Èç¹ûѹËõÊý¾Ý¿âÄØ£¿Çë¸ßÊÖÖ¸µã
ѹËõÊý¾Ý¿â£¿ÄÜ×öµ½Ã´...
ÆÚ´ý¸ßÈËÖ¸µã ÎÒ ......