Çë½ÌÒ»¸öSQLÓï¾ä
±í [Class]
cid cname ...
1 aaa
2 bbb
3 ccc
±í [New]
nid cid ...
1 1
2 1
3 1
4 3
ÏëÒªÖ´ÐÐSQL²éѯ֮ºóÏÔʾÈçÏÂ
1 aaa 3
2 bbb 0
3 ccc 1
ÇëÎʸÃÔõôд£¿
SQL code:
create table #Class
(
cid int identity(1,1) primary key,
cname nvarchar(20)
)
insert into #Class select 'aaa'
insert into #Class select 'bbb'
insert into #Class select 'ccc'
create table #New
(
nid int identity(1,1) primary key,
cid int
)
insert into #New select 1
insert into #New select 1
insert into #New select 1
insert into #New select 3
select C.*,isnull(N.cnt,0) from #Class C
full join
(
select cid,count(cid) cnt from #New group by cid
)N
on
C.cid=N.cid
SQL code:
create table #Class
(
cid int identity(1,1) primary key,
cname nvarchar(20)
)
insert into #Class select 'aaa'
insert into #Class select 'bbb'
insert into #Class select 'ccc'
create table #New
(
nid int identity(1,1) pr
Ïà¹ØÎÊ´ð£º
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jas ......
ÎÒÓÐÒ»¸ö±í£¬½á¹¹ÊÇÕâÑù¡£
ת³ö µ¥Î» תÈ뵥λ ±ÊÊý ½ð¶î
date(Ö÷) outid(Ö÷) inid(Ö÷) num amt
2009 1 2 1 500 Ϊ 1 µ¥Î» ÔÚ2009Ä ......
ÏëÓÃSQL CLR×öÈçϵĴ洢¹ý³Ì,µ«ÊÇ·¢ÏÖ±¨´í:
{ÓÉÓÚ´úÂëÒѾ¹ýÓÅ»¯»òÕß±¾»ú¿ò¼ÜλÓÚµ÷ÓöÑÕ»Ö®ÉÏ£¬ÎÞ·¨¼ÆËã±í´ïʽµÄÖµ¡£}
¶øÇÒÈç¹ûÊý¾Ý´Ócase 1ͨ¹ýʱ¾ÍÊÇÕýÈ·µÄ,´Ócase 2ͨ¹ýʱ´íÎó
²¢ÇÒÔÚc ......
sqlserver2005 ½¨Á¢µÄÊý¾Ý¿â£¬ÓëÊÖ³Öpda´«ÊäÊý¾Ý£¬×î½üͻȻ³öÏÖÎÞ·¨´«µÝÊý¾ÝµÄÎÊÌ⣬pda¶ËÌáʾµÄ´íÎóʱoutofmemoryexception£¬µ«ÊÇpdaÉÏÃæµÄÈÝÁ¿Ã»ÓÐÎÊÌ⣬
sqlserverµÄÈÕ×ÓÉϵĴíÎóÈçÏ£º
ÈÕÆÚ 2010-1-25 14:45: ......