zoukankan      html  css  js  c++  java
  • 第一次使用Excel2007的Microsoft Query遇到的问题及解决:别名的使用

    如果数据源是MsSql,则别名用[]括起来。

    如:

    SELECT  s.id as [ID],realname as [学生名字],workplacename as [校区],w.id as [校区ID],companyid as [分公司ID],s.create_time as [发生时间] from students s
    left join offices o on s.currentplace=o.ID
    left join workplaces w on o.workplaceid=w.id
    where w.id in ('86')
    order by w.id,s.create_time

    如果数据源是MySql,则别名什么都不加。

    如:

    SELECT studentcode as ID,studentname as 学生名字,XDschoolshortname as 校区,XDschoolid as 校区ID,branchID as 分公司ID,InsertTime as 发生时间 FROM `StudentSearch`
    where xdschoolID in ('303')
    order by XDschoolid,InsertTime

  • 相关阅读:
    equals方法
    StringBudilde
    日期
    system
    File类
    calender
    stringbuilder tostring
    File的三种构造方法
    Java入门——day52
    Java入门——day53
  • 原文地址:https://www.cnblogs.com/thomaswang/p/2043112.html
Copyright © 2011-2022 走看看