码迷,mamicode.com
首页 >  
搜索关键字:where    ( 20257个结果
oracle如何判断字段是数字还是字符
参考百度oracle正则表达式--数字开头的select * from tmp where regexp_like(str,'^[0-9]');--从头到位都是数字select * from tmp where regexp_like(str,'^[0-9]+$')--字段中是数字或者是字母组成se...
分类:数据库   时间:2015-12-14 16:07:34    阅读次数:326
Mysql 别名的使用方法
在查询时,可以为表和字段取一个别名。这个别名可以代替其指定的表和字段为表取别名mysql> SELECT * FROM department d -> WHERE d.d_id=1001;+------+-----------+--------------+-------------+| d_...
分类:数据库   时间:2015-12-14 16:03:23    阅读次数:321
sql 查询每月的销售金额
sql数据分月统计,表中只有每天的数据,现在要求求一年中每个月的统计数据(一条sql)SELECT MONTH ( 那个日期的字段 ), SUM( 需要统计的字段, 比如销售额什么的 )FROM 表WHERE YEAR ( 那个日期的字段 ) = 2010 -- 这里假设你要查 2010年的每月的统...
分类:数据库   时间:2015-12-14 14:13:58    阅读次数:824
tp导出excel
//数据导出 protected function dao($db,$where,$join,$field){ $data = M($db)->join($join)->where($where)->field($field)->order('stime desc')->select...
分类:其他好文   时间:2015-12-14 10:40:29    阅读次数:121
113.Path Sum II
Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.For example:Given the below binary tree and sum ...
分类:其他好文   时间:2015-12-13 18:47:52    阅读次数:144
[LeetCode]题解(python):042-Trapping Rain Water
题目来源https://leetcode.com/problems/trapping-rain-water/Givennnon-negative integers representing an elevation map where the width of each bar is 1, comp...
分类:移动开发   时间:2015-12-13 17:06:18    阅读次数:179
Hyper-v Server检查点(虚拟机快照)
Hyper-vServer检查点(虚拟机快照)不知道大家有没有想到过,如果你能及时地返回到以前的某个时间点,然后看看当时你的虚拟机是怎么样的?比如说,在生产环境中的WindowsServer安装Update产品补丁之前,你的虚拟机是怎样的?或者,由于在SQLupdate语句中遗漏了where语句,导致..
分类:其他好文   时间:2015-12-13 11:12:47    阅读次数:488
ORA-06577:output parameter not a bind variable
1、错误描述2、错误原因create or replace procedure query_student(id in int,name out varchar2) is begin select t.name into name from t_stu_info t where t.id = id; end query_student;call query_student(1,'12');3...
分类:其他好文   时间:2015-12-13 00:49:55    阅读次数:1301
数据库字符串操作
select 字段1 from 表1 where 字段1.IndexOf("云")=1;这条语句不对的原因是indexof()函数不是sql函数,改成sql对应的函数就可以了。left()是sql函数。select 字段1 from 表1 where charindex('云',字段1)=1; 字符...
分类:数据库   时间:2015-12-12 20:12:21    阅读次数:197
LeetCode:Search Insert Position
问题叙述性说明:Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were insert...
分类:其他好文   时间:2015-12-12 13:55:31    阅读次数:135
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!