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

sql ´æ´¢¹ý³Ì ¶¯Ì¬±í DateTimeÊý¾ÝÀàÐÍ Ìí¼ÓÎÊÌâ

ÎÒµÄÊý¾Ý¿âµÄ±íÊǶ¯Ì¬µÄ±í,ÔÚÌí¼ÓÊý¾ÝµÄʱºòÓÐÒ»¸ö×Ö¶ÎÊÇDATETIMEÊý¾ÝÀàÐ͵Ä,ÏÂÃæÊÇ´æ´¢¹ý³Ì
if exists (select * from sysobjects where name='proc_ADD_Order')
drop proc proc_ADD_Order
go
create procedure proc_ADD_Order
@memberID nvarchar(20),
@futuresClass nvarchar(4),
@orderWay nvarchar(10),
@orderSet char(1),
@orderCount int,
@orderPrice nvarchar(20),
@orderTime datetime,
@result char(1),
@penName nvarchar(40),
@txOrderClass nvarchar(10),
@contestID nvarchar(40),
@yyMM nvarchar(4)
as
declare @tablename nvarchar(15),@guid nvarchar(40) set @tablename = 'TxOrder'+@yyMM set @guid=newid()
exec(
'insert into '+@tablename+' ( [guid],[memberid],[futuresclass],[orderway],[orderset],[ordercount],[orderprice],[ordertime],[result],[penname],[txorderclass],[contestid]) values ( '''+@guid+''','''+@memberID+''','''+@futuresClass+''','''+@orderWay+''','''+@orderSet+''','+@orderCount+','+@orderPrice+'+0.00,'+@orderTime+','''+@result+''','''+@penName+''','''+@txOrderClass+''','''+@contestID+''' )'
)
go
ÏÂÃæÊÇÎҵIJâÊÔÊý¾Ý:
DECLARE @return_value int

EX


Ïà¹ØÎÊ´ð£º

Çó×ésqlÓï¾ä(a+b)=a

ÇóÔÚһͬһ¸ö±íÀïÃæ
a  b
10  7
(a-b)=a
ÔÚÔ­À´µÄ±íA¶Î¸üÐÂΪ3
ÏÈлл¸÷λÁË,°ï¸öæ
SQL code:
update a set a=a-b


SQL code:
-->Title:Generating test data
-->Author ......

ÇóÕâ¾äSqlÈçºÎÀí½â

create table [¿Í»§ÁªÏµ±í]([¿Í»§±àºÅ] varchar(2),[ÁªÏµÈÕÆÚ] datetime,[ÁªÏµÄÚÈÝ] int)
insert [¿Í»§ÁªÏµ±í]
select 'aa','2009/01/01',111 union all
select 'bb','2009/02 ......

ÇóSQLÒ»ÌõÓï¾äµÄ½â¾ö·½·¨

±ÈÈç ÎÒÓÐÒ»¸ö±í bumen

ÀïÃæ ÓÐÒ»¸öÁР quanxian
id  name  quanxian

1    a    001;002;003;
2    b    002;003;
3    ......

ÓÐÈËÓùýsql server2005 ´´½¨·¢²¼Âð£¿

¾ÍÊÇÕ¹¿ªreplication ÓÒ¼üµ¥»÷ local Subscription ´´½¨·¢²¼£¬ ÓÐÈËÓùýÂ𣬳ɹ¦´´½¨·¢²¼µÄÓÐÂð£¿
Óùý£¬¿ÉÒԳɹ¦

ÒýÓÃ
Óùý£¬¿ÉÒԳɹ¦

Ã×ÓùýµÄ°ï¶¥

ÒýÓÃ
Óùý£¬¿ÉÒԳɹ¦

µÚÒ»²½ÎҾ͹ý² ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ