select * into ºÍinsert into SQL SERVER
select * into destTbl from srcTbl
insert into destTbl(fld1, fld2) select fld1, 5 from srcTbl
ÒÔÉÏÁ½¾ä¶¼Êǽ« srcTbl µÄÊý¾Ý²åÈëµ½ destTbl£¬µ«Á½¾äÓÖÓÐÇø±ðµÄ£º
µÚÒ»¾ä£¨select into from£©ÒªÇóÄ¿±ê±í£¨destTbl£©²»´æÔÚ£¬ÒòΪÔÚ²åÈëʱ»á×Ô¶¯´´½¨¡£
µÚ¶þ¾ä£¨insert into select from£©ÒªÇóÄ¿±ê±í£¨destTbl£©´æÔÚ£¬ÓÉÓÚÄ¿±ê±íÒѾ´æÔÚ£¬ËùÒÔÎÒÃdzýÁ˲åÈëÔ´±í£¨srcTbl£©µÄ×Ö¶ÎÍ⣬»¹¿ÉÒÔ²åÈë³£Á¿
Ïà¹ØÎĵµ£º
½ñÌì²âÊÔwebÏîĿн¨ÁËÒ»¸öÊý¾Ý¿â£¬½á¹û±¨´í,ÒÔÇ°µÇ¼ֱ½ÓÑ¡Ôñ'WindowsÉí·ÝÑéÖ¤',²¢Ã»ÓÐʲôÎÊÌâ³öÏÖ!¿ÉÇ°¶Îʱ¼ä²ÉÓÃ'SQLSERVERÉí·ÝÑéÖ¤'È¥µÇ¼,ËæÖ®µÄÎÊÌâ¾ÍÀ´ÁË.ÎÞÂÛÓÃʲô·½·¨¾ÍÊÇÒ»¸ö½á¹û³ö´í! ³ö´íµÄÔÒòÊÇ:'Óû§ 'sa' µÇ¼ʧ°Ü¡£¸ÃÓû§Óë¿ÉÐÅ SQL Server Á¬½ÓÎÞ¹ØÁª'.½ñÌìÉÏÍøÉϲéÁË°ëÌ컹ÊǸ㲻¶¨,×îºó¾¹ýÍøÉϺÍÊéÉ ......
Ê×ÏÈ£¬ÓÃwindows Éí·ÝÑéÖ¤ µÇ½ sql server 2005
ÒÀ´ÎÕ¹¿ª
°²È«ÐÔ->µÇ¼Ãû
Ñ¡ÖÐ sa ÓÒ¼üµ¥»÷
Ñ¡ÖÐ ÊôÐÔ
µ¯³ö sa µÄÊôÐÔ¶Ô»°¿ò
¾ÍÔÚÃÜÂë´¦ ¸Ä ÃÜÂë ÐÐÁË
¸ÄÁËÃÜÂëºó Óà sa ºÍ Äã¸ÄµÄÃÜÂëµÇ½
Èç¹û»¹µÇ½²»ÉÏ
¾ÍÊÇÄãû´ò¿ª sql serverºÍ windowsÉí·ÝÑéÖ¤
ºÍûÊÚÓè sa µÇ½ȨÏÞ
½â¾ö°ì·¨ÈçÏÂ
£º£º£º£º ......
1. select top pageSize
* from table where id not in(select top((pageNo-1)*pageSize
) id from table order by id asc)
2. select * from table where id<=pageSize*pageNo
and id>(pageNo-1)*pageSize
order by id asc
×¢£º
pagesizeÿҳÏÔʾµÄ¼Ç¼Êý
pageNoµ±Ç°µÚ¼¸Ò³
......
ÊÂÎñ¾ÍÊǸºÔð°ÑһϵÁвÙ×÷¿´×öÒ»¸ö¶ÀÁ¢µÄÂß¼µ¥Ôª£¬ÕâЩ²Ù×÷Ҫôͬʱ³É¹¦£¬ÒªÃ´Í¬Ê±Ê§°Ü¡£ÏÂÃæÊÇÒ»¸ö¾µäµÄÀý×Ó£º
create procedure TransferMoeny
(
@fromAccountNo varchar(50),-- ת³öÕ˺Å
@ToAccountNo varchar(50),--תÈëÕ˺Å
& ......
POEAAÖнéÉÜÁËORMÖÐ×îÖØÒªµÄģʽ֮һ£ºUnit Of Work¡£¿´ËƼòµ¥£¬ÊµÏÖÆðÀ´È´·Ç³£¸´ÔÓ¡£
HibernateÍêÃÀµÄʵÏÖÁËÕâ¸öģʽ¡£ÒÔÏÂÎÒÓÃһϵÁеÄÀý×ÓÀ´·ÖÎöHibernateµÄ´¦Àí»úÖÆ
ÏÂÃæÓÐÈý¸öÀý×Ó£¬²Â²Â¿´Hibernate»áÖ´Ðм¸¾äSQL(Ê¡ÂÔÊÂÎñ´¦Àí´úÂ룬ʵÌå¶ÔÏó½ÐUser£¬¼ÙÉèÖ÷¼üÊÇ×ÔÔöÐ͵Ä)
Àý1:
User user = new User();
user.setN ......