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

[SQL Server] ´æ´¢¹ý³ÌÊÂÎñ

ÔÚ´æ´¢¹ý³ÌÖÐʹÓÃÊÂÎñ£¬ÒÔÏÂΪģ°å£º
CREATE PROCEDURE testPro
AS
/**//* ------- ÊÂÎñ¿ªÊ¼---------- */
BEGIN TRANSACTION tran_test
/**//* -------- ±£´æÊÂÎñ----------*/
SAVE TRANSACTION tran_test
/**//* -------- Êý¾Ý²Ù×÷---------*/
INSERT [table1] ( [content] ) VALUES ( '43332' )
/**//*---------- Ìá½»ÊÂÎñ------------*/
COMMIT TRANSACTION tran_test
/**//*--------- ÅжÏÊÇ·ñÓдíÎó----------*/
IF ( @@ERROR <> 0 )
BEGIN
/**//*---------- ×Ô¶¨Òå´íÎóÊä³ö----------*/
RAISERROR( 'Insert data error!',16,1 )
/**//*-------- ÊÂÎñ»Ø¹ö--------*/
ROLLBACK TRANSACTION tran_test
END
/**//*------- ÅжÏÊÂÎñÊýÊÇ·ñ´óÓÚ-----------*/
IF ( @@TRANCOUNT > 0 )
BEGIN
/**//*-------- ÊÂÎñ»Ø¹ö--------*/
ROLLBACK TRANSACTION tran_test
END
GO


Ïà¹ØÎĵµ£º

SQL Server ÖеIJéѯ֪ͨ (ADO.NET)

²éѯ֪ͨÊÇÔÚ Microsoft SQL Server 2005 ÖÐÒÔ¼° ADO.NET 2.0 µÄ System.Data.SqlClient ÃüÃû¿Õ¼äÖÐÒýÈëµÄ¡£²éѯ֪ͨ½¨Á¢ÔÚ Service Broker »ù´¡½á¹¹µÄ»ù´¡ÉÏ£¬Ê¹Ó¦ÓóÌÐò¿ÉÒÔÔÚÊý¾Ý¸ü¸ÄʱÊÕµ½Í¨Öª¡£Èç¹ûÓ¦ÓóÌÐòÌṩÊý¾Ý¿âÖÐÐÅÏ¢µÄ»º´æ£¨ÀýÈç Web Ó¦ÓóÌÐò£©£¬ÐèÒªÔÚÔ´Êý¾Ý¸ü¸Äʱ½ÓÊÕ֪ͨ£¬´Ë¹¦ÄÜÌرðÓÐÓá£
ͨ¹ýÈýÖÖ·½Ê½ ......

Javaµ÷ÓÃSQL ServerµÄ´æ´¢¹ý³ÌÏê½â

1ʹÓò»´ø²ÎÊýµÄ´æ´¢¹ý³Ì
¡¡¡¡Ê¹Óà JDBC Çý¶¯³ÌÐòµ÷Óò»´ø²ÎÊýµÄ´æ´¢¹ý³Ìʱ£¬±ØÐëʹÓà call SQL תÒåÐòÁС£²»´ø²ÎÊýµÄ call תÒåÐòÁеÄÓï·¨ÈçÏÂËùʾ£º
¡¡¡¡
ÒÔÏÂÊÇÒýÓÃƬ¶Î£º
{call procedure-name}
¡¡¡¡×÷ΪʵÀý£¬ÔÚ SQL Server 2005 AdventureWorks ʾÀýÊý¾Ý¿âÖд´½¨ÒÔÏ´洢¹ý³Ì£º
¡¡¡¡
ÒÔÏÂÊÇÒýÓÃƬ¶Î£º ......

PL/SQL 001

ÔÚ Oracle 10g  ÖР
¿ÉÒÔͨ¹ý http://localhost:5560/isqlplus ·ÃÎÊ isqlplus 
ÔÚ isqlplus ÖÐ ¿ÉÒÔÖ´ÐÐ plsql
set serveroutput on size 100000   // ´ò¿ª ·þÎñÆ÷µÄÊä³ö  on ºóÃæÊÇ »º´æµÄ´óС ·¶Î§ÊÇ  (2000 ÖÁ 1000000)
begin
   dbms_output.put_line('hel ......

SQL ServerÊÂÎñÈÕÖ¾½ÒÃØ

ÊÂÎñÈÕÖ¾ÀïÃ擲ؔןܶàÓÐÓõÄÐÅÏ¢¡£ËäÈ»SQL Server±¾Éí²¢Ã»ÓÐÌṩ·ÖÎö¹¤¾ß£¬µ«ÊÇÎÒÃÇ¿ÉÒÔʹÓõÚÈý·½¹¤¾ßÀ´Ò»Ì½¾¿¾¹¡£
Red GateÈí¼þÌṩÁËÒ»¿î½Ð×öSQL Log RescueµÄÃâ·Ñ¹¤¾ß£¬µ«ÊÇÖ»Ö§³ÖSQL Server 2000¡£ApexSQLºÍLumigent¹«Ë¾ÌṩµÄÁ½¿îÈí¼þ·Ö±ð½Ð×öApexSQL LogºÍLog Explorer£¬ËüÃÇÖ§³ÖSQL Server7¡¢2000ºÍ ......

sql server³£ÓÃÓï¾ä

1¡¢°´Ê±¼äÅÅÐò
select * from tbl_lms_loginhistory  order by loginhistory_logintime desc
2¡¢
  
ÔÚÒ»¸öÊý¾Ý¿âÖÐÊÇÏÂÁеÄÑù×Ó
³µ´Î Éí·ÝÖ¤ºÅ
27 1
27 2
45 1
25 1
45 2
ÏÖÔÚÎÒÏë »ñµÃµÄÊÇ
³µ´Î ³Ë×ø´ÎÊý
25 1
27 3
45 2
ÇëÎÊ£¬ÎÒµÄSQLÓï¾ä¸ÃÔõôд£¿
select ³µ´ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ