ÇóÒ»sqlÓï¾ä - MS-SQL Server / »ù´¡Àà
±í
id bh
1 10
2 11
3 12
4 15
5 16
6 22
7 25
8 26
9 27
10 28
½«bh°´Á¬Ðø·Ö¶Î³öÀ´·µ»Ø×Ö·û´®£º
10~12£¬15~16£¬22£¬25~28
SQL code:
declare @t table(num int)
insert into @t select 1
union all select 2
union all select 3
union all select 4
union all select 5
union all select 12
union all select 17
union all select 18
union all select 19
union all select 20
union all select 25
select
rtrim(a.num)+(case when min(b.num)!=a.num then '-'+rtrim(min(b.num)) else '' end)
from
(select t.num from @t t where not exists(select 1 from @t where num=t.num-1)) a,
(select t.num from @t t where not exists(select 1 from @t where num=t.num+1)) b
where
a.num<=b.num
group by a.num
-------------------------
1-5
12
17-20
25
*/
{{
Ïà¹ØÎÊ´ð£º
select convert(varchar(50),cast(convert(numeric(18,2),1275674000000/100000000)as real))+'ÒÚ'
select cast(convert(numeric(18,2),1275674000000/100000000)as real)
ΪʲôÉÏÒ»¸öÓÃvarcharת»»ºó¾ÍÖ»±£ÁôÁËÒ ......
ÎÒÒªµÃµ½Ò»¸ö×Ö·û´®È磺
sdfk|||sgts
sdfsfd|||rgreg
wrfw|||sefw
¾ÍÊÇÒªµÃµ½|||ºóÃæµÄ×Ö·û´®£¬ÓÐʲôº¯ÊýÂð£¿ÔõôÓÃÄØ£¿Ð»Ð»£¡
SQL code:
select
right(col,len(col)-charindex('|||',col)-2)
f ......
½ñÌì×öÁËÒ»¸ö´æ´¢¹ý³Ì »·¾³ÊÇSQL2000Êý¾Ý¿â
´óÖÂÈçÏÂ
½¨Á¢ÁÙʱ±í
¶¨ÒåÔ±¹¤Óαê
Ñ»·Ô±¹¤£¨ÊôÓÚ1¸ö¹«Ë¾)
......
protected void btnLogin_Click(object sender, EventArgs e)
{
SqlConnection conn = new SqlConnection("Server = (local);user id = sa;pwd = 1;database = Login");
&nb ......
СµÜ£¬×î½üҪתÐÐÈ¥×öoracle¿ª·¢ÁË£¬ÓÉÓÚ´óѧ±Ïҵʱ£¬×ßÁ˸öÍä·£¬ÏÖÔÚºÜСÐÄ£¬ÎÊÏ£¬×öPL/SQLÓÐûÓÐǰ;£¿£¿£¿
µ±È»ÎÒ˵µÄÕâ¸öǰ;ÊÇÖ¸ ÒÔºóÒªÌø²Û£¬Êг¡¶ÔÕâÑùµÄÈ˲ŵÄÐèÇóÁ¿´ó²»´ó£¿£¿
3q ÄÇ¿´À´»¹Ö»ÄÜÏȽӴ ......