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

sqlÓï¾ä£¬È¡³ö±íAÖеĵÚ31Ìõµ½40Ìõ¼Ç¼

 sqlÓï¾ä£¬È¡³ö±íAÖеĵÚ31Ìõµ½40Ìõ¼Ç¼£¨±íAÒÔ×Ô¶¯Ôö³¤µÄID×öÖ÷¼ü£¬×¢ÒâID¿ÉÄÜÊDz»Á¬ÐøµÄ£©
-->select top 10 * from a where id not in (select top 30 id from a order by id) order by id
    ²éѯǰʮÌõ¼Ç¼£¬µ«Ìõ¼þÊÇ£ºID²»ÔÚÇ°ÈýÊ®ÌõµÄIDÀïÃæ
-->select top 10 * from (select top 40 * from a order by id desc(½µÐò))
   ²éѯǰʮÌõ¼Ç¼£¬µ«Ìõ¼þÊÇ£ºIDÈ¡³öµÄÊÇÒÔID°´½µÐòÅÅÁеÄÇ°ËÄÊ®Ìõ¼Ç¼ÀïÃæµÄ
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
  ¾Û¼¯Ë÷ÒýºÍ·Ç¾Û¼¯Ë÷Òý——  
         ÓÃÒ»¸öÏÖʵÖеÄÀý×Ó˵Ã÷ÒÔÖúÀí½â¡£ÎÒÃǵĺºÓï×ÖµäµÄÕýÎı¾Éí¾ÍÊÇÒ»¸ö¾Û¼¯Ë÷Òý¡£±ÈÈ磬ÎÒÃÇÒª²é“°²”×Ö£¬¾Í»áºÜ×ÔÈ»µØ·­¿ª×ÖµäµÄÇ°¼¸Ò³£¬ÒòΪ“°²”µÄÆ´ÒôÊÇ“
an”£¬¶ø°´ÕÕÆ´ÒôÅÅÐòºº×ÖµÄ×ÖµäÊÇÒÔÓ¢ÎÄ×Öĸ“a”¿ªÍ·²¢ÒÔ“z”½áβµÄ£¬ÄÇô“°²”×Ö¾Í×ÔÈ»µØÅÅÔÚ×ÖµäµÄÇ°²¿¡£Èç¹ûÄú·­ÍêÁËËùÓÐÒÔ“a”¿ªÍ·µÄ²¿·ÖÈÔÈ»ÕÒ²»µ½Õâ¸ö×Ö£¬ÄÇ
ô¾Í˵Ã÷ÄúµÄ×ÖµäÖÐûÓÐÕâ¸ö×Ö£»Í¬ÑùµÄ£¬Èç¹û²é“ÕÅ”×Ö£¬ÄÇÄúÒ²»á½«ÄúµÄ×ֵ䷭µ½×îºó²¿·Ö£¬ÒòΪ“ÕÅ”µÄÆ´ÒôÊÇ“zhang”¡£Ò²¾ÍÊÇ˵£¬×ÖµäµÄÕýÎIJ¿·Ö±¾Éí¾ÍÊÇÒ»¸öĿ¼£¬
Äú²»ÐèÒªÔÙÈ¥²éÆäËûĿ¼À´ÕÒµ½ÄúÐèÒªÕÒµÄÄÚÈÝ¡£
¡¡¡¡ÎÒÃÇ°ÑÕâÖÖÕýÎÄÄÚÈݱ¾Éí¾ÍÊÇÒ»ÖÖ°´ÕÕÒ»¶¨¹æÔòÅÅÁеÄĿ¼³ÆΪ“¾Û¼¯Ë÷Òý”¡£
¡¡¡¡Èç¹ûÄúÈÏʶij¸ö×Ö£¬Äú¿ÉÒÔ¿ìËٵشÓ×Ô¶¯Öв鵽Õâ¸ö×Ö¡£µ«ÄúÒ²¿ÉÄÜ»áÓöµ½Äú²»ÈÏʶµÄ×Ö£¬²»ÖªµÀËüµÄ·¢Òô£¬Õâʱºò£¬Äú¾Í²»ÄÜ°´Õողŵķ½·¨ÕÒµ½ÄúÒª²éµÄ×Ö£¬¶øÐèҪȥ¸ù
¾Ý“Æ«ÅÔ²¿Ê×”²éµ½ÄúÒªÕÒµÄ×Ö£¬È»ºó¸ù¾ÝÕâ¸ö×ÖºóµÄÒ³ÂëÖ±½Ó·­µ½Ä³Ò³À´ÕÒµ½ÄúÒªÕÒµÄ×Ö¡£µ«Äú½áºÏ“²¿Ê×Ŀ¼”ºÍ“¼ì×ֱ픶ø²éµ½µÄ×ÖµÄÅÅÐò²¢²»ÊÇÕæÕýµÄÕýÎĵÄÅÅÐò·½·¨
£¬±ÈÈçÄú²é“ÕÅ”×Ö£¬ÎÒÃÇ¿ÉÒÔ¿´µ½Ôڲ鲿Ê×Ö®ºóµÄ¼ì×Ö±íÖГÕÅ”µÄÒ³ÂëÊÇ672Ò³£¬¼ì×Ö±íÖГÕÅ”µÄÉÏÃæÊÇ“³Û”×Ö£¬µ«Ò³ÂëÈ´ÊÇ63Ò³£¬“ÕÅ”µÄÏÂÃæÊÇ“åó”×Ö£¬Ò³ÃæÊÇ390
Ò³¡£ºÜÏÔÈ»£¬ÕâЩ×Ö²¢²»ÊÇÕæÕ


Ïà¹ØÎĵµ£º

SQL²Ù×÷È«¼¯

ÏÂÁÐÓï¾ä²¿·ÖÊÇMssqlÓï¾ä£¬²»¿ÉÒÔÔÚaccessÖÐʹÓá£
SQL·ÖÀࣺ
DDL—Êý¾Ý¶¨ÒåÓïÑÔ(CREATE£¬ALTER£¬DROP£¬DECLARE)
DML—Êý¾Ý²Ù×ÝÓïÑÔ(SELECT£¬DELETE£¬UPDATE£¬INSERT)
DCL—Êý¾Ý¿ØÖÆÓïÑÔ(GRANT£¬REVOKE£¬COMMIT£¬ROLLBACK)
Ê×ÏÈ,¼òÒª½éÉÜ»ù´¡Óï¾ä£º
1¡¢ËµÃ÷£º´´½¨Êý¾Ý¿â
CREATE DATABASE data ......

¸ßÐÔÄÜÍøÕ¾½¨ÉèÖ® MS Sql ServerÊý¾Ý¿â·ÖÇø

ʲôÊÇÊý¾Ý¿â·ÖÇø£¿
Êý¾Ý¿â·ÖÇøÊÇÒ»ÖÖ¶Ô±íµÄºáÏò·Ö¸î£¬Sql server 2005ÆóÒµ°æºÍÖ®ºóµÄSql server°æ±¾²ÅÌṩÕâÖÖ¼¼Êõ£¬ÕâÖÖ¶Ô±íµÄºáÏò·Ö¸î²»Í¬ÓÚ2000Öеıí·Ö¸î£¬Ëü¶Ô·ÃÎÊÓû§ÊÇ͸Ã÷µÄ£¬Óû§²¢²»»á¸Ð¾õµÄ±í±»ºáÏò·Ö¸îÁË¡££¨2000ÖеıíºáÏò·Ö¸îÊǽ¨n¸ö±íÀýÈ簴ʱ¼ä½¨±íÿÔÂÒ»¸ö±í£¬±íÃû²»Í¬£¬×îºóÐèÒª×öÒ»¸ö´óÊÓͼ£©
¹ØÓÚ¾ß ......

C# sql ʵÏÖͼƬÅúÁ¿´¢´æ¶ÁÈ¡

 winformÏ£º
         //´æ´¢
        private void MemoryImage()
        {
            string sql = "";
   &nbs ......

.net¾­µäSQLÓï¾ä´óÈ«

 ÏÂÁÐÓï¾ä²¿·ÖÊÇMssqlÓï¾ä£¬²»¿ÉÒÔÔÚaccessÖÐʹÓá£
¡¡¡¡SQL·ÖÀࣺ
¡¡¡¡DDL—Êý¾Ý¶¨ÒåÓïÑÔ(CREATE£¬ALTER£¬DROP£¬DECLARE)
¡¡¡¡DML—Êý¾Ý²Ù×ÝÓïÑÔ(SELECT£¬DELETE£¬UPDATE£¬INSERT)
¡¡¡¡DCL—Êý¾Ý¿ØÖÆÓïÑÔ(GRANT£¬REVOKE£¬COMMIT£¬ROLLBACK)
¡¡¡¡Ê×ÏÈ,¼òÒª½éÉÜ»ù´¡Óï¾ä£º
¡¡¡¡1¡¢ËµÃ÷£º´´½¨Êý ......

SQL ÅжÏÉí·ÝÖ¤ºÅÂë

ÏÖÒªÇó²éѯ½çÃ棺²»ÂÛ15λ»òÕß18λÉí·ÝÖ¤ºÅ¶¼Äܲéѯ³öÊý¾Ý¿âÖÐËùÓе±Ç°Óû§ÐÅÏ¢¡£
·½°¸1£º
create or replace function CONVERT_ID_15 (/*ת»»Éí·ÝÖ¤ºÅΪ15λ*/
  p_id2 in varchar2
) return varchar2
is
  p_id varchar2(20);
  id varchar2(15);
begin
  p_id:=ltrim(p_id2);
  p_id ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ