我在网上下的一个源码 里面有个sql语句没看懂。
select top 4 id,picture,url_name,substring(title,0,15) as title from news_content where bigclassid='26' and picture<>''  order by times desc
这句什么意思呢?

解决方案 »

  1.   

    选择bigclassid为26并且picture字段不为空字符的前4条数据,如何根据时间排序
      

  2.   

    id,picture,url_name,substring(title,0,15) as title
    前面这段呢
      

  3.   

    我猜想你想问的是这段吧,substring(title,0,15) as title 它的间思是取表中的title字段的前15个字符, as 字段名称,是给字段取一个别名。
     
      

  4.   


    致死把 title 截取了 15位而已  还是as  title 了  根本没有用别名