linq to sql ÖеÄÀàÐÍÇ¿´«½â¾ö·½°¸
List<Class1> li = dc.Table_1.Where(item => item.id > 1).Cast<Class1>().ToList();
Table_1 Ϊ×Ô¶¯Éú³ÉÀà, class1Ϊ×Ô¶¨ÒåÀà,ÊôÐÔÃû³Æ¶¼ÊÇÒ»ÑùµÄ,ÒªÄÜʵÏÖÉÏÃæµÄÓï¾ä,±ØÐëÓм¸¸öÌõ¼þ
Table_1 ÐèÒª¼Ì³Ðclass1,¿ÉÒÔͨ¹ýpartialÀàÀ´ÊµÏÖ
Table_1 ÊôÐÔ¼Óoverride
class1ÀïÃæµÄÊôÐÔÒªÊÇvirtual »òÆäËü¿É¼Ì³ÐÐÞÊηû
Ïà¹ØÎĵµ£º
ÔÚ¹¤×÷Öг£³£Åöµ½ÕâÖÖÇé¿ö£ºÎÒÃÇÐèÒª½«Ò»¸öÓ¦ÓÃϵͳµÄ»ù´¡Êý¾Ýµ¼³öÀ´£¬ÒÔ±ã»ù´¡Êý¾ÝÏ´ε¼Èëµ½ÁíÍâÒ»¸ö³¡¾°¡£
ÊÂʵÉÏ£¬ÕâÖÖÇé¿öÎÒÃÇ¿ÉÒÔÓÃpl/sqlµÄ¹¦ÄÜExport TablesÀ´ÊµÏÖ¡£Export TableÓÐÈýÖÖµ¼³ö·½Ê½£ºOracle Export£¬SQL Insert£¬PL/SQL Developer¡£Í¨³£ÎÒÃÇ»áʹÓÃOracle Export£¬SQL InsertµÄ¹¦ÄÜ¡£(µÚÈýÖÖ°³Ã»Óùý£¬ ......
´ÓA±íËæ»úÈ¡2Ìõ¼Ç¼,ÓÃSELECT TOP 10 * from ywle order by newid()
order by Ò»°ãÊǸù¾Ýijһ×Ö¶ÎÅÅÐò,newid()µÄ·µ»ØÖµÊÇuniqueidentifier ,order by newid()Ëæ»úÑ¡È¡¼Ç¼ÊÇÈçºÎ½øÐеÄ
newid()ÔÚɨÃèÿÌõ¼Ç¼µÄʱºò¶¼Éú³ÉÒ»¸öÖµ, ¶øÉú³ÉµÄÖµÊÇËæ»úµÄ, ûÓдóСд˳Ðò. ËùÒÔ×îÖÕ½á¹ûÔÙ°´Õâ¸öÅÅÐò, ÅÅÐòµÄ½á¹ûµ±È»¾ÍÊÇÎÞÐòµ ......
±ÈÈçÏÖÔÚÓÐÒ»ÈËÔ±±í £¨±íÃû£ºpeosons£©
ÈôÏ뽫ÐÕÃû¡¢Éí·ÝÖ¤ºÅ¡¢×¡Ö·ÕâÈý¸ö×Ö¶ÎÍêÈ«ÏàͬµÄ¼Ç¼²éѯ³öÀ´
select p1.* from persons p1,persons p2 where p1.id<>p2.id and p1.cardid &nbs ......
Õý³£µÇ½sql*plusµÄ²½ÖèÈçÏ£º
sbdatabase*orcl-/home/oracle>sqlplus /nolog
SQL*Plus: Release 10.2.0.3.0 - Production on Sun May 9 19:50:24 2010
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
SQL> conn hmsimis/test@orcl
Connected.
SQL>
¿ÉÒÔ¿´µ½Ç°ÃæµÄÌáʾ·ûÊÇSQL£¬ÏÖÔÚÏëÐ ......
Ëø»úÖÆ
NOLOCKºÍREADPASTµÄÇø±ð¡£
1. ¿ªÆôÒ»¸öÊÂÎñÖ´ÐвåÈëÊý¾ÝµÄ²Ù×÷¡£
BEGIN TRAN t
INSERT INTO Customer
SELECT 'a','a'
2. Ö´ÐÐÒ»Ìõ²éѯÓï¾ä¡£
SELECT * from Customer WITH (NOLOCK)
½á¹ûÖÐÏÔʾ"a"ºÍ"a"¡£µ±1ÖÐÊÂÎñ»Ø¹öºó£¬ÄÇôa½«³ÉΪÔàÊý¾Ý¡£(×¢:1ÖеÄÊÂÎñδÌá½») ¡£NOLOCK±íÃ÷ûÓжÔÊý¾Ý±íÌí¼Ó¹²Ï ......