/*Select语句完整的执行顺序:1、from子句组装来自不同数据源的数据;2、where子句基于指定的条件对记录行进行筛选;3、group by子句将数据划分为多个分组;4、使用聚集函数进行计算;5、使用having子句筛选分组;6、计算所有的表达式;7、使用order by对结果集进行排序。8...
分类:
数据库 时间:
2015-04-15 00:54:05
阅读次数:
220
what:什么是动态内存? c++中,普通变量(非static对象)存储在栈内存中,静态变量(局部static、类static)存储在静态内存中,在系统中还存在另外一种内存池,这部分内存供程序来分配,一般称作“自由空间“(free store)或”堆“(heap)。where & When:在哪里....
分类:
编程语言 时间:
2015-04-15 00:35:35
阅读次数:
216
Given an array where elements are sorted in ascending order, convert it to a height balanced BST.
这道题要求根据一个有序的数组建立一棵二叉排序树。利用折半的思想,构造根节点,再递归构造左右子树。递归出口是数组中只含一个元素。TreeNode *sortedArrayToBST(vector &...
分类:
其他好文 时间:
2015-04-14 21:34:22
阅读次数:
98
problem:
The gray code is a binary numeral system where two successive values differ in only one bit.
Given a non-negative integer n representing the total number of bits in the code, pr...
分类:
其他好文 时间:
2015-04-14 21:31:46
阅读次数:
149
select count(1) as 排名 from 表名 where 分数字段 >= (select 分数字段 from 表名 where 姓名字段 = ‘用户名‘) 参考博客:http://everthinking.blog.51cto.com/4671757/1078590...
分类:
数据库 时间:
2015-04-14 20:26:40
阅读次数:
158
problem:
Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histogram.
Above is a histo...
分类:
其他好文 时间:
2015-04-14 16:45:49
阅读次数:
88
一、like概述
like操作符用于在where句子中搜索列中的指定模式
语法:select column_name(s) from table_name where column_name
like pattern;
二、从persons表中选取addr以”s“开头的数据信息
语法:select * from persons where addr
like ...
分类:
数据库 时间:
2015-04-14 16:41:39
阅读次数:
142
1、代码篇姓名:密码:"; echo "你当前输入密码:".$pass.""; $sql="select * from user where username='$user' and password='$pass'"; $res=mysql_query($...
分类:
数据库 时间:
2015-04-14 16:17:30
阅读次数:
172
1、代码篇"; $sql="select * from user where id='$id' limit 0,1"; $res=mysql_query($sql); $row=mysql_fetch_array($res); if($row){ echo "你...
分类:
数据库 时间:
2015-04-14 16:13:39
阅读次数:
169
新建一个Trigger, 当使用update语句更新时,即使不更新Age字段,Age也会自动变为当前时间。CREATE TRIGGER tgr_modstampON ssAFTER UPDATE AS UPDATE ss SET Age = GETDATE() WHERE ID IN (SEL...
分类:
数据库 时间:
2015-04-14 16:09:39
阅读次数:
149