ACCESSºÍMSSQL ÈçºÎËæ»ú¶ÁÈ¡Êý¾Ý¿â¼Ç¼
²éѯÓï¾äÖ»ÒªÕâÑùд,¾Í¿ÉÒÔËæ»úÈ¡³ö¼Ç¼ÁË
SQL="Select top 6 * from Dv_bbs1 where isbest = 1 and layer = 1 order by newID() desc"
ÔÚACCESSÀï
SELECT top 15 id from tablename order by rnd(id)
SQL Server£º
Select TOP N * from TABLE Order By NewID()
Access£º
Select TOP N * from TABLE Order By Rnd(ID)
Rnd(ID) ÆäÖеÄIDÊÇ×Ô¶¯±àºÅ×ֶΣ¬¿ÉÒÔÀûÓÃÆäËûÈκÎÊýÖµÀ´Íê³É£¬±ÈÈçÓÃÐÕÃû×Ö¶Î(UserName)
Select TOP N * from TABLE Order BY Rnd(Len(UserName))
MySql£º
Select * from TABLE Order By Rand() Limit 10
SQLÊý¾Ý¿âÓиönewidº¯Êý£¬¿ÉÒԺܷ½±ãµÄÓÃSQLÓï¾äµÃµ½±íÖеÄËæ»úÊý¾Ý¡£µ«accessÊý¾Ý¿âûÕâô·½±ã£¬ËäÈ»ÓиöRnd£¬¿ÉÒÔͨ¹ý“select top 10 * from tb order by rnd(id)”µÃµ½Ëæ»úÊý¾Ý£¬¿ÉϧÔÚVBÖÐʹÓ㬲úÉúµÄËæ»úÐòÁÐÊÇÒ»ÑùµÄ¡£
ÓÐÈË˵ÔÚ³ÌÐòÖмÓÉÏRandomize³õʼ»¯Ëæ»úÖÖ×Ó£¬ÄÇôÕâֻ˵¶ÔÁËÒ»°ë£¬ÔÚ³ÌÐòÖмòµ¥µÄ¼ÓÉÏRandomize£¬ÊÇû×÷Óõģ¬µÀÀíºÜ¼òµ¥£¬Randomize²»¿ÉÄÜÓ°ÏìSQLÓï¾äÖеÄrnd,ÄÇÖ»²»¹ýÊǸö×Ö·û´®£¬SQLÓï¾äÊǷŵ½jetÖÐÈ¥Ö´Ðеġ£
ǰЩÌìÔÚÂÛ̳ÉÏ¿´µ½ÓÐÈË˵ÓÃtime£¬ÄÇôֻÓÃrnd(time)ÕâÑùÊDz»Ðеģ¬rndÖбØÐëÒª°üº¬±íÖеÄÒ»¸ö×Ö¶Î(ÈÎÒâ×ֶΣ¬µ±È»ÊÇÖ÷¼üЧ¹û¸üºÃ)£¬²âÊÔÏÂÀ´£¬rnd(time+id)ÕâÑùÒÀÈ»²»ÐÐ! ²»¹ý·Ç³£ÒâÍâµÄÊÇrnd(time-id)È´³É¹¦ÁË¡£ÎªÊ²Ã´ËµÒâÍ⣬°´ÎÒµÄÀí½â£¬timeÔÚÓëÊýÖµ×öÔËËãʱ£¬»áת»»³ÉÒ»¸öСÓÚ1µÄdouble£¬ÕâÑùÓëID£¨´óÓÚ1µÄÕýÖµ£©×ö¼õÔËËãµÄ½á¹û±ØÈ»ÊÇÒ»¸ö¸ºÊý£¬ÎÒÃÇÖªµÀrndÈç¹ûÓÃÁ˸ºÊýÖÖ×Ó£¬»á²úÉúÏàͬµÄËæ»úÐòÁУ¬ÕâÊÇÎļþ¼Ó½âÃÜËã·¨Öг£Óõ½µÄ·½·¨£¬¿ÉÔÚÕâ¶ùÈ´Äܵõ½ÕýÈ·µÄ½á¹û£¬µ½ÏÖÔÚҲûÏëͨ......
½ÓÏÂÈ¥£¬ÓÃrnd(time-id)¼ÌÐø²âÊÔÄã»á·¢ÏÖ£¬Á¬Ðø¿ìËٵزéѯÏ£¬»áÓÐÎÊÌ⣬»á³öÏÖ¶þ´Î»òÈý´Î²éѯ½á¹ûÒ»ÑùµÄÎÊÌâ¡£·ÖÎöһϿÉÒÔÕÒµ½ÔÒò£¬rnd(number)ÖеÄnumberÊǸösingle£¬ÕâÑùËü»á½Ø¶Ïtime-idÕâ¸öÔËËã½á¹ûdoubleºóÃæÊý×Ö£¬ÕâÑù¿ìËÙ²éѯʱnumberÕâ¸öֵû¸Ä±ä£¬ËùÒÔ²éѯ½á¹ûҲûÓиı䡣
Ïà¹ØÎĵµ£º
--×Ö¶ÎÌí¼Ó˵Ã÷
EXEC sp_addextendedproperty 'MS_Description', 'ÒªÌí¼ÓµÄ˵Ã÷', 'user', dbo, 'table', ±íÃû, 'column', ÁÐÃû
--ɾ³ý×Ö¶Î˵Ã÷
EXEC sp_dropextendedproperty 'MS_Description', 'user', dbo, 'table', ±íÃû, 'column', ×Ö¶ÎÃû
--²é¿´×Ö¶Î˵Ã÷
SELECT
[Table Name] = i_s.TAB ......
¸üз½·¨Ò»£¬Ö±½ÓÔÚGridViewÖÐÀ´¸üÐÂÊý¾Ý.
¸üз½·¨¶þ£¬´ò¿ªÒ»¸öеÄÒ³ÃæÀ´¸üÐÂÊý¾Ý.
//¸üÐÂ
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
GridView1.EditIndex = e.NewEditIndex;
&nbs ......
ÓÉÓÚ³ÌÐòÐèÒª°ÑSQL SERVER ÀïµÄÊý¾Ýµ¼Èëµ½ACCESSÀï.
¸Õ¿ªÊ¼Ê¹ÓÃDataSetÀ´Ñ»·.
Êý¾ÝÁ¿ÉÙµÄʱºò»¹Ëã¿ÉÒÔÓ¦¸¶µÄ¹ýÀ´.
µ«µ±Êý¾Ý¶àµÄʱºò.
»á±¨´í"λÖôíÎó"
ÔÚÍøÉÏËÑÑ°Ò»·¬.ÕÒµ½Ò»¸ö·½·¨.
ʹÓÃinsert into openrowset
½Ó×Å´íÎóÒ»¸ö½ÓÒ»¸öµÄÀ´..
"²åÈë´íÎó: ÁÐÃû»òËùÌṩֵµÄÊýÄ¿Óë±í¶¨Ò岻ƥÅä¡£"
"δÄÜÕÒµ½ OLE DB Ì ......
Access¡¢SQLServer¡¢Oracle³£¼ûSQLÓï¾äÓ¦ÓÃÇø±ð
¹Ø¾¢ËÉ PMP
Èç¹ûÒª¼æÈÝAccess¡¢SQL Server¡¢OracleÈý¸öÊý¾Ý¿â°æ±¾£»ÎÒÃÇÔÚ±àдSQLÓï¾äµÄ¹ý³ÌÖУ¬¾¡Á¿Ê¹ÓÃһЩͨÓõÄÓï¾ä£¬µ«»¹ÊÇÓÐЩ·½ÃæÓÐЩÇø±ð±ÜÃâ²»ÁË£¬ÏÖ¼òµ¥×ܽáһϡ£
ÒÔÏÂA´ú±íAccess,S´ú±íSQL Server,O´ú±íOracle
1¡¢È¡µ±Ç°ÏµÍ³Ê±¼ä
A:Select Now()
S:Selec ......
ÉÏÍøgoogleÁËһϣ¬¿´Á˼¸¸öÈ˵ÄÌû×Ó£¬´ó¸ÅÃ÷°×ÁËÊÇʲôÒâ˼¡£
Èç¹ûÒ»¸öÓû§µÄIPÔÚ×î½üÒ»¶Îʱ¼äÄÚ¶à´ÎÓÉÓÚÃÜÂë´íÎóµÇ¼ʧ°Ü£¬ÄÇôϵͳ¾Í»á°ÑÕâ¸öÓû§·âµô£¬submit»òÕßmail¾Í»áÌáʾAccess denied.
Õâ±¾ÊÇÒ»¸ö°²È«´ëÊ©£¬µ«ÊÇûÏëµ½poj¿ªÍ¨ËùνµÄ"¹«Íø¼ÓËÙ"Ö®º ......