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

¼¸¸öSQL ServerÓï¾äºÍ´æ´¢¹ý³Ì

-- ======================================================
--ÁгöSQL SERVER ËùÓÐ±í£¬×Ö¶ÎÃû£¬Ö÷¼ü£¬ÀàÐÍ£¬³¤¶È£¬Ð¡ÊýλÊýµÈÐÅÏ¢
--ÔÚ²éѯ·ÖÎöÆ÷ÀïÔËÐм´¿É,¿ÉÒÔÉú³ÉÒ»¸ö±í£¬µ¼³öµ½EXCELÖÐ
-- ======================================================
SELECT
       (case when a.colorder=1 then d.name else '' end)±íÃû,
       a.colorder ×Ö¶ÎÐòºÅ,
       a.name ×Ö¶ÎÃû,
       (case when COLUMNPROPERTY( a.id,a.name,'IsIdentity')=1 then '√'else '' end) ±êʶ,
       (case when (SELECT count(*)
       from sysobjects
       WHERE (name in
                 (SELECT name
                from sysindexes
                WHERE (id = a.id) AND (indid in
                          (SELECT indid
                         from sysindexkeys
                         WHERE (id = a.id) AND (colid in
                                   (SELECT colid
                                  from syscolumns


Ïà¹ØÎĵµ£º

SQL Server£º´æ´¢Í¼ÏñºÍBLOBÎļþ

SQL Server£º´æ´¢Í¼ÏñºÍBLOBÎļþ(Ò»)
 
×÷ÕߣºØýÃû ÎÄÕÂÀ´Ô´£ºOnegreen.Net ä¯ÀÀ´ÎÊý£º2559 ¸üÐÂʱ¼ä£º2008-5-25 23:16:09 
¡¡¡¡Ê²Ã´ÊÇBLOB
¡¡¡¡Ê×ÏÈ£¬ÎÒÃÇÀ´±È½ÏÁ½ÖÖÎļþÀàÐÍASCIIºÍ¶þ½øÖÆ¡£´æ´¢ÔÚSQL ServerÖеĴ󲿷ÖÊý¾ÝÖµ¶¼ÊÇÓÉASCII(ÃÀ¹úÐÅÏ¢½»»»±ê×¼´úÂë)×Ö·û×é³É¡£¼òµ¥ËµÀ´£¬ASCII×Ö·û¾ÍÊÇÄܹ»ÔÚ¼ ......

½«ExcelµÄÊý¾Ýµ¼Èëµ½SQL 2005ÏÖÓеıíÖÐ

ÎÒÔÚ½«ExcelµÄÊý¾Ýµ¼Èëµ½SQLµÄʱºòÀÏÊdzöÏÖÏÂÃæµÄ´íÎó£º
ÅäÖÃÑ¡Ïî 'show advanced options' ÒÑ´Ó 1 ¸ü¸ÄΪ 1¡£ÇëÔËÐÐ RECONFIGURE Óï¾ä½øÐа²×°¡£
ÅäÖÃÑ¡Ïî 'Ad Hoc Distributed Queries' ÒÑ´Ó 1 ¸ü¸ÄΪ 1¡£ÇëÔËÐÐ RECONFIGURE Óï¾ä½øÐа²×°¡£
ÏûÏ¢ 7399£¬¼¶±ð 16£¬×´Ì¬ 1£¬µÚ 1 ÐÐ
Á´½Ó·þÎñÆ÷ "(null)" µÄ OLE DB ·ÃÎÊ ......

SQLÀïµÄÖ÷¼üºÍÍâ¼ü

Õâ¸öÂß¼­¹Øϵէ¿´ÆðÀ´±È½Ï¸´ÔÓ£¬ÅªÇå³þÁ˾ͺã¡
ÓÐÁ½¸ö±í£¬
student(
id,
name,
primary key (id)
);
studentInfo(
id,
age,
address,
foreign key(id) references outTable(id) on delete cascade on update cascade
);
µ±ÎÒÃÇɾ³ýstudent±íµÄʱºò×ÔȻϣÍûstudentInfoÀïµÄÏà¹ØÐÅÏ¢Ò²±»É¾³ý£¬Õâ¾ÍÊÇÍâ¼üÆð×÷Óà ......

²éѯ°à¼¶Öм°¸ñ£¬Ò»°ã£¬ÓÅÐãµÄÈËÊýµÄsqlÓï¾ä

select a.ClassName,a.CourseName,sum(²»¼°¸ñ) as ²»¼°¸ñ,sum(²î) as ²î,sum(ÖеÈ) as ÖеÈ,sum(ºÃ) as ºÃ ,sum(²»¼°¸ñ)+sum(²î)+sum(ÖеÈ)+sum(ºÃ) as °à¼¶×ÜÈËÊý from (select StudentID,ClassName,CourseName,1 as ²»¼°¸ñ,0 as ²î,0 as ÖеÈ,0 as ºÃ from StudentScore where ScoreRemark='fail' union all
select Stu ......

magento ÔÚMagentoÖÐʹÓÃ×Ô¼ºÐ´µÄSQLÓï¾ä


MagentoµÄModels
ºÍCollection
 ºÜÇ¿´ó£¬Ê¹ÓÃËüÃÇ¿ÉÒԺܷ½±ãµÄ²éѯºÍ²Ù×÷Êý¾Ý¿â¡£µ«ÊÇÓÐЩ³¡ºÏ£¬ÒòΪһЩÌØÊâÐèÇó»ò¶ÔMagentoµÄÁ˽ⲻ¹»É¿ÉÄÜ»áÐèÒª×Ô¼ºÊÖдSQLÓï¾äÀ´²éѯºÍ²Ù×÷Êý¾Ý¿â¡£ÒÔÏ·ֱðÊǶÁдÊý¾Ý¿âµÄ´úÂë¡£

// For Read
// fetch read database connection that is used in Mage_Core modul ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ