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

Sql Server ×Ö·û´®¾ÛºÏº¯Êý

 Sql Server ÓÐÈçϼ¸Ö־ۺϺ¯ÊýSUM¡¢AVG¡¢COUNT¡¢COUNT(*)¡¢MAX ºÍ MIN£¬µ«ÊÇÕâЩº¯Êý¶¼Ö»ÄܾۺÏÊýÖµÀàÐÍ£¬ÎÞ·¨¾ÛºÏ×Ö·û´®¡£Èçϱí:AggregationTable
Id Name
1 ÕÔ
2 Ç®
1 Ëï
1 Àî
2 ÖÜ
Èç¹ûÏëµÃµ½ÏÂͼµÄ¾ÛºÏ½á¹û
Id Name
1 ÕÔËïÀî
2 Ç®ÖÜ
ÀûÓÃSUM¡¢AVG¡¢COUNT¡¢COUNT(*)¡¢MAX ºÍ MINÊÇÎÞ·¨×öµ½µÄ¡£ÒòΪÕâЩ¶¼ÊǶÔÊýÖµµÄ¾ÛºÏ¡£²»¹ýÎÒÃÇ¿ÉÒÔͨ¹ý×Ô¶¨Ò庯ÊýµÄ·½Ê½À´½â¾öÕâ¸öÎÊÌâ¡£
1.Ê×ÏȽ¨Á¢²âÊÔ±í£¬²¢²åÈë²âÊÔÊý¾Ý£º
view plaincopy to clipboardprint?
create table AggregationTable(Id int, [Name] varchar(10))  
go  
insert into AggregationTable  
    select 1,'ÕÔ' union all  
    select 2,'Ç®' union all  
    select 1,'Ëï' union all  
    select 1,'Àî' union all  
    select 2,'ÖÜ' 
go 
create table AggregationTable(Id int, [Name] varchar(10))
go
insert into AggregationTable
 select 1,'ÕÔ' union all
 select 2,'Ç®' union all
 select 1,'Ëï' union all
 select 1,'Àî' union all
 select 2,'ÖÜ'
go
2.´´½¨×Ô¶¨Òå×Ö·û´®¾ÛºÏº¯Êý
view plaincopy to clipboardprint?
Create FUNCTION AggregateString  
(  
    @Id int 
)  
RETURNS varchar(1024)  
AS  
BEGIN  
    declare @Str varchar(1024)  
    set @Str = '' 
    select @Str = @Str + [Name] from AggregationTable  
    where [Id] = @Id  
    return @Str  
END  
GO 
Create FUNCTION AggregateString
(
 @Id int
)
RETURNS varchar(1024)
AS
BEGIN
 declare @Str varchar(1024)
 set @Str = ''
 select @Str = @Str + [Name] from AggregationTable
 where [Id] = @Id
 return @Str
END
GO
3.Ö´ÐÐÏÂÃæµÄÓï¾ä£¬²¢²é¿´½á¹û
view plaincopy to clipboardprint?
select dbo.Aggregate


Ïà¹ØÎĵµ£º

ORA 07445 Óë PL/SQL Developer °¸ÀýÒ»Ôò

ORA-07445 Óë PL/SQL Developer °¸ÀýÒ»Ôò
×÷Õߣºeygle |English Version ¡¾×ªÔØʱÇëÒÔ³¬Á´½ÓÐÎʽ±êÃ÷ÎÄÕ³ö´¦ºÍ×÷ÕßÐÅÏ¢¼°±¾ÉùÃ÷¡¿
Á´½Ó£ºhttp://www.eygle.com/archives/2009/02/ora_07445_plsql_developer.html
--------------------------------------------------------------------------------
Ç°¼¸Ì죬ÓÖÓÐÒ»¸ö ......

SQL*LoaderʹÓÃÖ¸ÄÏ

Oracle µÄSQL*LOADER¿ÉÒÔ½«ÍⲿÊý¾Ý¼ÓÔص½Êý¾Ý¿â±íÖС£ÏÂÃæÊÇSQL*LOADERµÄ»ù±¾Ìص㣺
1£©ÄÜ×°È벻ͬÊý¾ÝÀàÐÍÎļþ¼°¶à¸öÊý¾ÝÎļþµÄÊý¾Ý
2£©¿É×°Èë¹Ì¶¨¸ñʽ£¬×ÔÓɶ¨½çÒÔ¼°¿É¶È³¤¸ñʽµÄÊý¾Ý
3£©¿ÉÒÔ×°Èë¶þ½øÖÆ£¬Ñ¹ËõÊ®½øÖÆÊý¾Ý
4£©Ò»´Î¿É¶Ô¶à¸ö±í×°ÈëÊý¾Ý
5£©Á¬½Ó¶à¸öÎïÀí¼Ç¼װµ½Ò»¸ö¼Ç¼ÖÐ
6£©¶ÔÒ»µ¥¼Ç¼·Ö½âÔÙ×°Èëµ½± ......

´«ÖDz¥¿Íjavaѧϰ sql¼òµ¥²éѯÓï¾ä

½ñÌìÎÒѧϰÁËsqlµÄ¼òµ¥²éѯÓï¾ä£¬
 
һЩ»ù±¾µÄ¸ÅÄ
1                  ϵͳȨÏÞ£ºÊý¾Ý¿âÖеĶÔÏó£¬ ±í£¬´´½¨±í£¬É¾³ý±í
2           ¶ÔÏóȨÏÞ£º¶ÔÊý¾ÝµÄÔö¡¢É¾¡¢¸Ä¡¢²é¡ ......

´«ÖDz¥¿Íjavaѧϰ sql³£Óú¯Êý

ÎÒ½ñÌìѧϰÁËsqlÓï¾äµÄ³£Óú¯Êý£¬ÊÇ·ëÍþÀÏʦ½²µÄ£¬ÎÒ×öÁ˼òµ¥µÄ±Ê¼Ç£º
 
Ò»£¬SQLº¯Êý£º
1. ´óСдת»»º¯Êý
   lower ת³ÉСд  
   upper ´óд
   initcap  ½«×Ö·û´®µÄ(ÿ¸öµ¥´ÊµÄ)µÚÒ»¸ö×Öĸ±äΪ´óд,ºóÃæµÄСд
 select initcap('huangHY') from dual
&n ......

sqlÓï¾ä²éѯÔõôÅжϲéѯ½á¹ûΪ¿Õ£¿

sqldataadapterÊʺÏÓÃÔÚ²éѯ½Ï¶à×Ö¶Îʱ.....
string sou = "select * from art where content like '%" + TextBox1.Text + "%'";
SqlDataAdapter da = new SqlDataAdapter(sou, conn);
DataSet ds = new DataSet();
da.Fill(ds);
if (ds.Tables[0].rows.count==0)
{
Response.Write("ûÓмǼ£¡");
}
else
{
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ