设为首页 加入收藏

TOP

数据库面试题
2014-11-19 01:46:40 来源: 作者: 【 】 浏览:26
Tags:数据库 试题

修改table里面的sexcol 值男变女 值女变男update table_name set sexcol=( case sexcol when ‘男’ then ‘女’ when ‘女’ then ‘男’ end ) update tableset sex=(case when sex=’男’ then ‘女’ else ‘男’ end) 表table 里面有两个字段 id 和 lastupdatetime 。ID是序号 lastupdatetime是最后一次的更新时间用一条语句查询出lastupdatetime最大的序号值?select id from table_name where lastupdatetime in (select lastupdatetime from table_name group by lastupdatetime having count(lastupdatetime )>1)(这语句没进行验证)


】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇查询优化的一般准则有哪些? 下一篇GWT的应用有哪两种部署模式?

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: