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

linq to sql ÖеÄin ²Ù×÷ʵÏÖ


        string s = " 80,81,83,82";
        string[] s1 = s.Split(',');
        int[] p = new int[s1.Count()];
        for (int i = 0; i < s1.Count(); i++)
        {
            p.SetValue(Convert.ToInt32(s1[i]), i);
        }
       
       
       
        public IQueryable<tbQuestions> SelectQuestions(int[] p)
        {
            var result = from s1 in db.tbQuestions
                         where !p.Contains(s1.id) && s1.deleteFlag == 0
                         select s1;
            return result;
        }


Ïà¹ØÎĵµ£º

SQL ServerÊÂÎñÈÕÖ¾µÄ¼¸¸ö³£ÓòÙ×÷ [ת]

ÎÒÃÇÖªµÀ£¬SQL ServerÊÂÎñÈÕÖ¾Ö÷ÒªÊÇÓÃÀ´¼Ç¼ËùÓÐÊÂÎñ¶ÔÊý¾Ý¿âËù×öµÄÐ޸ģ¬Èç¹ûϵͳ³öÏÖ¹ÊÕÏ£¬Ëü½«³ÉΪ×îÐÂÊý¾ÝµÄΨһÀ´Ô´¡£ÈÕÖ¾µÄ²Ù×÷³£ÓÐÒÔϼ¸¸öÓ¦Óãº
Ò»¡¢ÊÂÎñÈÕÖ¾ÎļþLDFµÄ¶ªÊ§
µ±ÎÒÃDz»Ð¡É¾³ý»òÕßLDFÎļþ¶ªÊ§µÄʱºò£¬Êý¾Ý¿âֻʣÏÂMDFÎļþ£¬´Ëʱֱ½Óͨ¹ý¸½¼ÓMDFÊÇÎÞ·¨»Ö¸´Êý¾Ý¿âµÄ£¬ÄÇÎÒÃÇÔõôÑù²ÅÄָܻ´Êý¾Ý¿âÄØ?Î ......

Oracle 10g SQL*PlusÃüÁîʵ¼ù


1¡¢Á¬½ÓOracleÊý¾Ý¿â
Æô¶¯SQL*Plus£¬ÒªÇóÊäÈëUser Name¡¢Password¡¢Host StringÕâÈý¸ö²ÎÊý£¬ÀýÈçÎÒÔÚ°²×°µÄʱºòĬÈÏ´´½¨µÄÊý¾Ý¿âΪorcl£¬Ò²¾ÍÊÇSID£¬ÃÜÂëҲΪorcl£¬¶ÔÓ¦ÉÏÃæµÄÈý¸ö²ÎÊýÈçÏÂËùʾ£º
User Name£ºorcl
Password£ºorcl
Host String£ºorcl as sysdba
¾Í¿ÉÒԵǼ³É¹¦¡£
»òÕßÒ²¿ÉÒÔʹÓÃĬÈϵÄscottÀ´µÇ¼£º ......

SQL SERVER 2005 ÈçºÎÆô¶¯·þÎñ

1.¡¸¿ªÊ¼¡¹²Ëµ¥->ÔËÐÐ
--Æô¶¯sql server 2005 ·þÎñ
net start mssqlserver
--Í£Ö¹sql server 2005 ·þÎñ
net stop mssqlserver
2.¡¸¿ªÊ¼¡¹²Ëµ¥->³ÌÐò->Microsoft SQL Server 2005->ÅäÖù¤¾ß
SQL Server Configuration Manager->SQL Server(MSSQLSERVER) ÓÒ»÷ Æô¶¯·þÎñ³É¹¦ºó£¬×´Ì¬ÏÔʾΪ“ÕýÔÚÔËÐ ......

SQL SERVERÖн»ºÍ²îµÄʵÏÖ

create table aaa
(
id int primary key ,
name varchar(30) not null
)
create table bbb
(
id int primary key ,
name varchar(30) not null
)
--½»
select * from aaa
where exists
(
select * from bbb where aaa.id=bbb.id and aaa.name = bbb.name
)
--²î
select *
from bbb
where not exists
( ......

SQL·ÖÒ³


SQL·ÖÒ³
ÍòÄÜ·ÖÒ³
.net´úÂë
select top Ã¿Ò³ÏÔʾµÄ¼Ç¼Êý * from topic where id not in     
 (select top £¨µ±Ç°µÄÒ³Êý-1£©×ÿҳÏÔʾµÄ¼Ç¼Êý id from topic order by id desc)  ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ