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

Ê¡ÊÐÖ®Ò» ´´½¨È«¹úÊ¡ÊÐSql±í

×î½üÓÐÅóÓÑÓöµ½Ê¡ÊеÄÎÊÌ⣬ÏëÏë×Ô¼º½ñºóÒ²ÓпÉÄÜ»áÓöµ½£¬ËùÒÔ¾Í×Ô¼ºÔÚÍøÉÏдд£¬ËÑËÑ£¬Ö÷ÒªÊǶÔ×Ô¼º½ñºóÓвο¼
--´´½¨Êý¾Ý¿â
create database NationalAll
Go
--ʹÓÃNationalAllÊý¾Ý¿â
use  NationalAll
Go
--´´½¨Ê¡¼¶±í
Create Table Province
(
ProID int primary key not null,
ProName nvarchar(50) not null
)
Go
--Öйú34¸öÊ¡¼¶ÐÐÕþµ¥Î» 23¸öÊ¡ 5¸ö×ÔÖÎÇø 4¸öֱϽÊÐ 2ÌرðÐÐÕþÇø
insert into Province values(1,'±±¾©ÊÐ')
insert into Province values(2,'Ìì½òÊÐ')
insert into Province values(3,'ÉϺ£ÊÐ')
insert into Province values(4,'ÖØÇìÊÐ')
insert into Province values(5,'ºÓ±±Ê¡')
insert into Province values(6,'ɽÎ÷Ê¡')
insert into Province values(7,'̨ÍåÊ¡')
insert into Province values(8,'ÁÉÄþÊ¡')
insert into Province values(9,'¼ªÁÖÊ¡')
insert into Province values(10,'ºÚÁú½­Ê¡')
insert into Province values(11,'½­ËÕÊ¡')
insert into Province values(12,'Õã½­Ê¡')
insert into Province values(13,'°²»ÕÊ¡')
insert into Province values(14,'¸£½¨Ê¡')
insert into Province values(15,'½­Î÷Ê¡')
insert into Province values(16,'ɽ¶«Ê¡')
insert into Province values(17,'ºÓÄÏÊ¡')
insert into Province values(18,'ºþ±±Ê¡')
insert into Province values(19,'ºþÄÏÊ¡')
insert into Province values(20,'¹ã¶«Ê¡')
insert into Province values(21,'¸ÊËàÊ¡')
insert into Province values(22,'ËÄ´¨Ê¡')
insert into Province values(23,'¹óÖÝÊ¡')
insert into Province values(24,'º£ÄÏÊ¡')
insert into Province values(25,'ÔÆÄÏÊ¡')
insert into Province values(26,'Çຣʡ')
insert into Province values(27,'ÉÂÎ÷Ê¡')
insert into Province values(28,'¹ãÎ÷׳×å×ÔÖÎÇø')
insert into Province values(29,'Î÷²Ø×ÔÖÎÇø')
insert into Province values(30,'ÄþÏÄ»Ø×å×ÔÖÎÇø')
insert into Province values(31,'н®Î¬Îá¶û×ÔÖÎÇø')
insert into Province values(32,'ÄÚÃɹÅ×ÔÖÎÇø')
insert into Province values(33,'°ÄÃÅÌرðÐÐÕþÇø')
insert into Province values(34,'Ïã¸ÛÌرðÐÐÕþÇø')
Go
--´´½¨Ê춱í
Create Table City
(
CityID int  not null,
CityName nvarchar(50) primary key not null,
ProID int
)
go
--²åÈë¸÷¸öÊ¡µÄ³ÇÊ


Ïà¹ØÎĵµ£º

ÓÃASP.NET/C#Á¬½ÓAccessºÍSQL ServerÊý¾Ý¿â

Á¬½ÓAccess
Ê×ÏÈ¿´Ò»¸öÀý×Ó´úÂëƬ¶Ï:
³ÌÐò´úÂë:
--------------------------------------------------------------------------------
using System.Data;
using System.Data.OleDb;
......
string strConnection="Provider=Microsoft.Jet.OleDb.4.0;";
strConnection+=@"Data Source=C:\BegASPNET\Northwind.mdb" ......

Ҳ̸SQL¸÷ÖÖÁ¬½Ó£¨JOIN£©

×î½ü¹«Ë¾ÔÚÕÐÈË£¬Í¬ÊÂÎÊÁ˼¸¸ö×ÔÈÏΪÊý¾Ý¿â¿ÉÒÔµÄӦƸÕß¹ØÓÚ¿âÁ¬½ÓµÄÎÊÌ⣬»Ø´ð²»¾¡ÀíÏë¡«
ÏÖÔÚÔÚÕâдд¹ØÓÚËüÃǵÄ×÷ÓÃ
¼ÙÉèÓÐÈçÏÂ±í£º
Ò»¸öΪͶƱÖ÷±í£¬Ò»¸öΪͶƱÕßÐÅÏ¢±í¡«¼Ç¼ͶƱÈËIP¼°¶ÔӦͶƱÀàÐÍ£¬×óÓÒÁ¬½Óʵ¼Ê˵ÊÇÎÒÃÇÁªºÏ²éѯµÄ½á¹ûÒÔÄĸö±íΪ׼¡«
1£ºÈçÓÒ½ÓÁ¬ right join »ò right outer join£º
ÎÒÃÇÒÔÓÒ±ß ......

sql plus ³£ÓÃÃüÁî

showºÍsetÃüÁîÊÇÁ½ÌõÓÃÓÚά»¤SQL*Plusϵͳ±äÁ¿µÄÃüÁî
SQL> show all --²é¿´ËùÓÐ68¸öϵͳ±äÁ¿Öµ
SQL> show user --ÏÔʾµ±Ç°Á¬½ÓÓû§
SQL> show error¡¡¡¡ --ÏÔʾ´íÎó
SQL> set heading off --½ûÖ¹Êä³öÁбêÌ⣬ĬÈÏֵΪON
SQL> set feedback off --½ûÖ¹ÏÔʾ×îºóÒ»ÐеļÆÊý·´À¡ÐÅÏ¢£¬Ä¬ÈÏֵΪ"¶Ô6¸ö» ......

InfoPath¿ª·¢£º»ñÈ¡SQL ServerÖеÄÊý¾Ý

¡¡¡¡±¾ÎÄʾÀýÔ´´úÂë»òËزÄÏÂÔØ
¡¡¡¡±¾½ÚµÄÄÚÈÝ£º
¡¡¡¡ÈçºÎÔÚInfoPathÖÐʹÓÃÊý¾ÝÁ¬½ÓÀ´´ÓSQL ServerÊý¾Ý¿âÖлñÈ¡Êý¾Ý
¡¡¡¡ÈçºÎͨ¹ý´úÂëÀ´ÐÞ¸ÄÊý¾ÝÁ¬½ÓÖеÄSQL²éѯ
¡¡¡¡ÔÚ¿ªÊ¼Éè¼ÆInfoPath±íµ¥Ö®Ç°£¬ÏÈ×¼±¸Ò»¸öÊý¾Ý¿â£¬InfoPathÖ§³ÖÁ½ÖÖÊý¾Ý¿âÁ¬½Ó£º
¡¡¡¡Microsoft Office AccessÊý¾Ý¿â£¨.mdbÎļþ»ò.accdbÎļþ£©
¡¡¡ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ