½â¾öͬʱÐÞ¸ÄͬһSQL¼Ç¼µÄÎÊÌâ
ÔÚÑ°ÕÒPowerDesignerÏà¹ØÐÅÏ¢µÄʱºòżȻ·¢ÏÖµÄ.ʹÓÃtimestamp
΢ÈíMSDNÄÚÈÝ:
timestamp (Transact-SQL)
¹«¿ªÊý¾Ý¿âÖÐ×Ô¶¯Éú³ÉµÄΨһ¶þ½øÖÆÊý×ÖµÄÊý¾ÝÀàÐÍ¡£timestamp ͨ³£ÓÃ×÷¸ø±íÐмӰ汾´ÁµÄ»úÖÆ¡£ ´æ´¢´óСΪ 8 ¸ö×Ö½Ú¡£ timestamp Êý¾ÝÀàÐÍÖ»ÊǵÝÔöµÄÊý×Ö£¬²»±£ÁôÈÕÆÚ»òʱ¼ä¡£ ÈôÒª¼Ç¼ÈÕÆÚ»òʱ¼ä£¬ÇëʹÓà datetime Êý¾ÝÀàÐÍ¡£
±¸×¢
ÿ¸öÊý¾Ý¿â¶¼ÓÐÒ»¸ö¼ÆÊýÆ÷£¬µ±¶ÔÊý¾Ý¿âÖаüº¬ timestamp ÁеıíÖ´ÐвåÈë»ò¸üвÙ×÷ʱ£¬¸Ã¼ÆÊýÆ÷Öµ¾Í»áÔö¼Ó¡£ ¸Ã¼ÆÊýÆ÷ÊÇÊý¾Ý¿âʱ¼ä´Á¡£ Õâ¿ÉÒÔ¸ú×ÙÊý¾Ý¿âÄÚµÄÏà¶Ôʱ¼ä£¬¶ø²»ÊÇʱÖÓÏà¹ØÁªµÄʵ¼Êʱ¼ä¡£ Ò»¸ö±íÖ»ÄÜÓÐÒ»¸ö timestamp ÁС£ ÿ´ÎÐ޸Ļò²åÈë°üº¬ timestamp ÁеÄÐÐʱ£¬¾Í»áÔÚ timestamp ÁÐÖвåÈëÔöÁ¿Êý¾Ý¿âʱ¼ä´ÁÖµ¡£ ÕâÒ»ÊôÐÔʹ timestamp Áв»ÊʺÏ×÷Ϊ¼üʹÓã¬ÓÈÆäÊDz»ÄÜ×÷ΪÖ÷¼üʹÓᣠ¶ÔÐеÄÈκθüж¼»á¸ü¸Ä timestamp Öµ£¬´Ó¶ø¸ü¸Ä¼üÖµ¡£ Èç¹û¸ÃÁÐÊôÓÚÖ÷¼ü£¬ÄÇô¾ÉµÄ¼üÖµ½«ÎÞЧ£¬½ø¶øÒýÓøþÉÖµµÄÍâ¼üÒ²½«²»ÔÙÓÐЧ¡£ Èç¹û¸Ã±íÔÚ¶¯Ì¬ÓαêÖÐÒýÓã¬ÔòËùÓиüоù»á¸ü¸ÄÓαêÖÐÐеÄλÖᣠÈç¹û¸ÃÁÐÊôÓÚË÷Òý¼ü£¬Ôò¶ÔÊý¾ÝÐеÄËùÓиüл¹½«µ¼ÖÂË÷Òý¸üС£
ʹÓÃijһÐÐÖÐµÄ timestamp ÁпÉÒÔºÜÈÝÒ×µØÈ·¶¨¸ÃÐÐÖеÄÈκÎÖµ×ÔÉϴζÁÈ¡ÒÔºóÊÇ·ñ·¢ÉúÁ˸ü¸Ä¡£ Èç¹û¶ÔÐнøÐÐÁ˸ü¸Ä£¬¾Í»á¸üиÃʱ¼ä´ÁÖµ¡£ Èç¹ûûÓжÔÐнøÐиü¸Ä£¬Ôò¸Ãʱ¼ä´ÁÖµ½«ÓëÒÔÇ°¶ÁÈ¡¸ÃÐÐʱµÄʱ¼ä´ÁÖµÒ»Ö¡£ ÈôÒª·µ»ØÊý¾Ý¿âµÄµ±Ç°Ê±¼ä´ÁÖµ£¬ÇëʹÓà http://msdn.microsoft.com/zh-cn/library/ms187366.aspx¡£
Transact-SQL timestamp Êý¾ÝÀàÐͲ»Í¬ÓÚÔÚ SQL-2003 ±ê×¼Öж¨ÒåµÄ timestamp Êý¾ÝÀàÐÍ¡£ SQL-2003 timestamp Êý¾ÝÀàÐ͵ÈͬÓÚ Transact-SQL datetime Êý¾ÝÀàÐÍ¡£
ÎҵIJâÊÔ½á¹û:
--½¨Á¢Ò»¸öTable
create table tmp1
(
name varchar(20),
timestamp
)
go
--²åÈë¼Ç¼
insert into tmp1 values('tony',null)
select * from tmp1
go
--Ö´Ðнá¹û(ÒòΪ֮ǰÒѾÓвåÈë¹ýÁË.ËùÒÔÊÇD):tony 0x000000000000300D
--Ð޸ļǼ
update tmp1 set name='tonywu'
select * from tmp1
go
--Ö´Ðнá¹û:tonywu 0x000000000000300E
update tmp1 set name='tony wu'
select * from tmp1
go
--Ö´Ðнá¹û:tony wu 0x000000000000300F
--ÔÙ²åÈëÒ»±Ê
insert into tmp1 values('wgj',null)
select * from tmp1
--Ö´Ðнá¹û:
--tony wu 0x000000000000300F
--wgj 0x0000000000003
Ïà¹ØÎĵµ£º
½ñÌìÎÒÃÇ¿ªÊ¼SQL SERVER BIµÄÁíÍâÒ»¸öÖØÒªµÄ²¿·Ö --Reporting Service£¬Ïà¶ÔÓÚIntegration ServiceºÍAnalysis Service£¬Reporing ServiceÔÚ¹úÄÚµÄʹÓÃÕßÓ¦¸Ã¶àºÜ¶à.Ò»·½ÃæÓÉÓÚReporing Service·ÑÓñȽϵͣ¬Ö±½Ó¸½ÊôÔÚSQL SERVERÖУ¬ÁíÍâÒ»·½ÃæÆäʵSSRSÔںܴó³Ì¶ÈÉÏ»¹ÊÇÂú×ãÎÒÃǵı¨±íÐèÇóµÄ¡£ ÔÚSQL Server 2008ÖУ¬ ......
BUILTIN\Administrators
-- Õâ¸öÊÇAdmin×éµÄȨÏÞ,ĬÈÏÇé¿öϱ¾µØAdmin¶¼Á¥ÊôÓÚÕâ¸ö×é,¾ßÓбȽϴóµÄȨÏÞ,
-- ×÷ΪWindows¼¯³ÉµÇ¼,Èç¹ûʹÓõÄÊǹÜÀíÔ±,¾Í»áʹÓõ½Ëü,
HC811\ASPNET
-- Õâ¸öÊÇASPNETÓ¦ÓõķÃÎÊÕʺÅ×é,
HC811\SQLServer2005MSFTEUser$HC811$MSSQLSERVER
-- Õâ¸öÊÇÈ«ÎÄË÷ÒýµÄ·ÃÎÊÕʺ ......
±¾ÏµÁÐÎÄÕµ¼º½
[Oracle]¸ßЧµÄSQLÓï¾äÖ®·ÖÎöº¯Êý(Ò»)--sum()
[Oracle]¸ßЧµÄSQLÓï¾äÖ®·ÖÎöº¯Êý(¶þ)--max()
[Oracle]¸ßЧµÄSQLÓï¾äÖ®·ÖÎöº¯Êý(Èý)--row_number() /rank()/dense_rank()
[Oracle]¸ßЧµÄSQLÓï¾äÖ®·ÖÎöº¯Êý(ËÄ)--lag()/lead()
ÓÐʱºò±¨±íÉÏÃæÐèÒªÏÔʾ¸Ã±Ê²Ù×÷µÄÉÏÒ»²½Öè»òÕßÏÂÒ»²½ÖèµÄÏêϸÐÅÏ¢£¬Õâ¸öʱºò¿ ......
HR·þÎñÆ÷£º ²Ù×÷ϵͳ->32λWindows2000 SP4 Êý¾Ý¿â->32λSQL Server2000
OA·þÎñÆ÷£º ²Ù×÷ϵͳ->64λWindows2003 SP2 Êý¾Ý¿â->64λSQL Server2005
OAÏî ......