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

ÇëÎÊÔÚSQLÀïÈçºÎʵÏÖ£ºÒ»¸öÊý×ÖÖ»ÄÜÓÐËÄλ

ÇëÎÊÔÚSQLÀïÈçºÎʵÏÖ£ºÒ»¸öÊý×ÖÖ»ÄÜÓÐËÄλ

È磺0001 ,0002......0011.....9999

Ï൱ÓÚVBÀïµÄÓï¾ä
For inti=1 to 9
  debug.print format(inti,"000#")
Next
SQL code:
right(×Ö¶ÎÃû£¬4)


SQL code:
declare @i int
set @i=1
while @i<10000
begin
print right('000'+ltrim(@i),4);
set @i=@i+1;
end


SQL code:

DECLARE @i int
DECLARE @tb table
(val varchar(4))
set @i = 0
while @i < 1000
begin
insert into @tb
SELECT REPLICATE('0', 4 - LEN(LTRIM(@i))) + LTRIM(@i)
set @i = @i + 1
end
select * from @tb



ÒýÓÃ
SQL codedeclare@iintset@i=1while@i <10000beginprintright('000'+ltrim(@i),4);set@i=@i+1;end

Ê÷¸ç»ØÀ´ÁË¡£¡£¡£

SQL code:

declare @table table (id int)
insert into @table
select 1 union all
select 2 union all
select 3 union all
select 4 union all
select 5 union all
select 6 union all
select 7 union all
select 8 union all
se


Ïà¹ØÎÊ´ð£º

SQLÓï¾äÎÊÌ⣬¸ßÊÖ°ïæ£¡£¡

½«Ò»¸ö±í21~30ɾ³ý£¬sqlÓï¾äÔõôд
Õâ¸öÌ«ÁýͳÁË£¬ÊÇÅÅÐòºóµÄµÚ21Ìõµ½30Ìõ¼Ç¼ɾ³ý»¹ÊÇijһÁÐÖµÔÚ21µ½30Ö®¼äµÄɾ³ý°¡£¿

21-30ÊÇʲôÒâ˼£¿×ֶεϰ¾Ídelete from table1 where col1>=21 and col1<=30
Ö¸µ ......

sql ÎÊÌâ

DateTime startTime=DateTime(em_1.Text)
DateTime endTime=DateTime(em_2.Text)

string sql
sql = dw_1.GetSQLSelect()+"Where (StartTime> '"+startTime+"') and (EndTime ......

SQL×ֶΣ¬ºáÏòÕ¹¿ª

ÇëÎʸ÷룬ÈçºÎ½«SQlÖУ¬Ä³×Ö¶ÎÖеÄÖµºáÏòÕ¹¿ªÄØ£¬
CASE WHEN

¾ßÌåÎÊÌâ¾ßÌå·ÖÎö£¬¿´ÄãÒªÔõôչ¿ª

ÐÕÃû  ¿ÆÄ¿      ³É¼¨
ÕÅÈý  Ó¢Óï    90
ÀîËÄ  Ó¢Óï&nb ......

²»Ã÷°×µÄSQL×¢ÈëÎÊÌâ

ÎÒÊý¾Ý¿âÊÇMSSQLµÄ£¬×òÌìËùÓÐµÄ±í±»×¢ÈëJS½Å±¾´úÂë,Óиö²»Ã÷°×µÄµØ·½À´ÎÊÎÊ´ó¼Ò

ÎÒ·¢ÏÖÓÐЩ±íÎÒ¸ù±¾Ã»Ê¹Óã¬Ò²Ã»ÓÐÈë¿âµÄASPÒ³ÃæºÍÓï¾ä£¬ËüÊÇÔÛ¸ö×¢ÈëµÄÄØ£¿
Ã²ËÆselectÓï¾äÊÇ¿ÉÒÔǶÌ׵İɣ¿
¿ÉÄÜÊÇwhere ......

C# Á¬½ÓSQLÊý¾Ý¿â³£ÓõÄÁ¬½Ó×Ö·û´®¸ÃÈçºÎд£¿

£¨1£©string ConnString = "server=localhost;integrated security=sspi;database=pubs;";   
£¨2£©string strConnection="user uid=sa;pwd=123456;Database=test;Server=test;Connect ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ