码迷,mamicode.com
首页 >  
搜索关键字:where    ( 20257个结果
Left join 中On和Where的作用范围
SQL语句如下:SELECT * FROM 表1 LEFT JOIN 表2 ON 表1.id = 表2.id AND 表2.Name != 'ff'WHERE 表1.NAME != 'aa' Left Join ,Where语句可以对Left的表有过滤作用,On只对Right的表有过滤作用。Rig....
分类:其他好文   时间:2015-04-10 17:39:18    阅读次数:84
【转】SQL常用的语句和函数
原文链接:http://www.cnblogs.com/mailingfeng/archive/2013/01/07/2850116.htmlorder by 的数值型灵活使用select * from table_a where order by decode(函数,'asc',1,'desc',...
分类:数据库   时间:2015-04-10 17:32:02    阅读次数:188
2015.4.10-SQL 高级查询(二)
1.TOP字句: 用于规定要返回的记录的数目select top number(个数)/percent(百分数) 列名 from 表名 2.like模糊查询,用于where字句中,以及通配符查询 名字开头为X的人的信息:查询 第五个字母为'Z' 的人的信息:[chrlist]:表示字符列中的任何单一...
分类:数据库   时间:2015-04-10 17:18:24    阅读次数:207
sql 小技巧应用
想查询某个字段属于哪个表select * from INFORMATION_SCHEMA.COLUMNS where column_name like '%字段名%' and table_catalog like '%数据库名%'格式化输出一个存储过程的详细内容sp_helptext 存储过程名称清...
分类:数据库   时间:2015-04-10 16:56:42    阅读次数:146
hdu 1151 Air Raid 最小路径覆盖
Air RaidTime Limit: 1 SecMemory Limit: 256 MB题目连接http://acm.hdu.edu.cn/showproblem.php?pid=1151DescriptionConsider a town where all the streets are on...
分类:其他好文   时间:2015-04-10 16:56:20    阅读次数:193
[LeetCode] 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 andsum =...
分类:其他好文   时间:2015-04-10 15:14:35    阅读次数:125
SQL Server 函数使用
1.SQL TOP 子句TOP子句用于规定要返回的记录的数目。语法:select top number/percent column_name(s) from 表名2.SQL like 操作符like操作符用于where子句中列中的指定模式。模糊查询;语法:select column_name(s)...
分类:数据库   时间:2015-04-10 15:00:20    阅读次数:152
数据库操作(二)
基本函数用法1、top: select top number/percent 列名 from表名2、in:select * from 表名 where 列名 in ('值1','值2'); 有时值为汉字时因编码方式不同数据库会检查不到结果,此时可在值前加N即为:('N值1','N值2');3、be....
分类:数据库   时间:2015-04-10 14:56:38    阅读次数:115
leetcode || 79、Word Search
problem: Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell, where "adjacent" cells are those horizo...
分类:其他好文   时间:2015-04-10 11:23:44    阅读次数:153
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!