sql server2005·µ»ØÖµÎÊÌâ
(1)¹ØÓÚ´æ´¢¹ý³Ì·µ»ØÖµÎÊÌ⣨output,ruturn£©
output´æ´¢¹ý³Ì£º
alter proc usp_update
@count int output
as
set @count=(select count(*) from stu)
return´æ´¢¹ý³Ì£º
alter proc usp_update
as
declare @count int
set @count=(select count(*) from stu)
return @count
.net´úÂ루output£©£º
SqlConnection con = new SqlConnection ("server=95F188CF1A24424;uid=jinzhiyuan;pwd=jinzhiyuan;database=student");
con.Open();
SqlCommand cmd = new SqlCommand("usp_update",con);
cmd.Parameters.Add("@count", SqlDbType.Int);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters["@count"].Direction = ParameterDirection.Output;
cmd.ExecuteNonQuery();
int j=(int)cmd.Parameters["@count"].Value;
Response.Write("ÎÒÊǸողÅÖ´ÐеÄÖµ£º"+j);
con.Close();
.net´úÂ루return£©
SqlConnection con = new SqlConnection("server=95F188CF1A24424;uid=jinzhiyuan;pwd=jinzhiyuan;database=student");
con.Open();
SqlCommand cmd = new SqlCommand("usp_update",con);
cmd.Parameters.Add("@count", SqlDbType.Int);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters["@count"].Direction = ParameterDirection.Ret
Ïà¹ØÎĵµ£º
ÔÚ³ÌÐòµÄ¿ª·¢¹ý³ÌÖУ¬´¦Àí·ÖÒ³ÊÇ´ó¼Ò½Ó´¥±È½ÏƵ·±µÄʼþ£¬ÒòΪÏÖÔÚÈí¼þ»ù±¾É϶¼ÊÇÓëÊý¾Ý¿â½øÐйҵöµÄ¡£µ«Ð§ÂÊÓÖÊÇÎÒÃÇËù×·ÇóµÄ£¬Èç¹ûÊÇÏñÔÀ´ÄÇÑù°ÑËùÓÐÂú×ãÌõ¼þµÄ¼Ç¼ȫ²¿¶¼Ñ¡Ôñ³öÀ´£¬ÔÙÈ¥½øÐзÖÒ³´¦Àí£¬ÄÇô¾Í»á¶à¶àµÄÀ˷ѵôÐí¶àµÄϵͳ´¦Àíʱ¼ä¡£ÎªÁËÄܹ»°ÑЧÂÊÌá¸ß£¬ËùÒÔÏÖÔÚÎÒÃǾÍֻѡÔñÎÒÃÇÐèÒªµÄÊý¾Ý£¬¼õÉÙÊý¾Ý ......
WAITFOR
Ö¸¶¨´¥·¢Óï¾ä¿é¡¢´æ´¢¹ý³Ì»òÊÂÎñÖ´ÐеÄʱ¼ä¡¢Ê±¼ä¼ä¸ô»òʼþ¡£
Óï·¨
WAITFOR { DELAY 'time' | TIME
'time' }
²ÎÊý
DELAY
ָʾ Microsoft® SQL Server™ Ò»Ö±µÈµ½Ö¸¶¨µÄʱ¼ä¹ýÈ¥£¬×¿É´ï 24 Сʱ¡£
'time'
ÒªµÈ´ýµÄʱ¼ä¡£¿ÉÒÔ°´ datetime Êý¾Ý¿É½ÓÊܵĸñʽָ¶¨
time£¬Ò²¿ÉÒÔÓþֲ¿±äÁ¿Ö¸¶ ......
ÆÕͨMySQLÔËÐУ¬Êý¾ÝÁ¿ºÍ·ÃÎÊÁ¿²»´óµÄ»°£¬ÊÇ×ã¹»¿ìµÄ£¬µ«Êǵ±Êý¾ÝÁ¿ºÍ·ÃÎÊÁ¿¾çÔöµÄʱºò£¬ÄÇô¾Í»áÃ÷ÏÔ·¢ÏÖMySQLºÜÂý£¬ÉõÖÁdownµô£¬ÄÇô¾ÍÒª¿¼ÂÇÓÅ»¯ÎÒÃǵÄMySQLÁË¡£
ÓÅ»¯ÎÞ·ÇÊÇ´ÓÈý¸ö½Ç¶ÈÈëÊÖ£º
µÚÒ»¸öÊÇ´ÓÓ²¼þ£¬Ôö¼ÓÓ²¼þ£¬Ôö¼Ó·þÎñÆ÷
µÚ¶þ¸ö¾ÍÊǶÔÎÒÃǵÄMySQL·þÎñÆ÷½øÐÐÓÅ»¯£¬Ôö¼Ó»º´æ´óС£¬¿ª¶à¶Ë¿Ú£¬¶Áд·Ö¿ª
µÚÈý¸ö ......
1.Ê×ÏÈÐèÒª½¨Á¢plan table,·ñÔò²»ÄÜʹÓÃ
½¨Á¢·½·¨£º
$oracle\rdbms\adminÏÂÓиö
utlxplan.sql
ÆäÄÚÈÝΪ:
create table PLAN_TABLE (
statement_id varchar2(30),
timestamp date,
remarks varchar2(80),
operat ......
ÒòΪÑöÍûORACLE£¬ËùÒÔÒ»Ö±¶¼ÒÔΪSQL SERVERºÜ±¿¡£
¾Ý´«SQL 2005ÓÐÁËRowIDµÄ¶«Î÷£¬¿ÉÒÔ½â¾öTOPÅÅÐòµÄÎÊÌâ¡£¿Éϧ»¹Ã»Óлú»áÌåÑé¡£ÔÚSQL 2000ÖÐд´æ´¢¹ý³Ì£¬×Ü»áÓöµ½ÐèÒªTOPµÄµØ·½£¬¶øÒ»µ©Óöµ½TOP£¬ÒòΪû°ì·¨°ÑTOPºóÃæµÄÊý×Ö×÷Ϊ±äÁ¿Ð´µ½Ô¤±àÒëµÄÓï¾äÖÐÈ¥£¬ËùÒÔÖ»Äܹ»Ê¹Óù¹Ôì SQL£¬Ê¹ÓÃExecÀ´Ö´ÐС£²»ËµÐ§ÂʵÄÎÊÌ⣠......