MySQL_Table_Sub_Query
2016-05-05 00:00
477 查看
摘要: In -- Compare > < ... -- Exists -- Any -- All
1. In
2. Compare > < ...
3. Exists
4. Any
5. All
1. In
select * from t_book tb where tb.bookTypeId in (select id from t_bookType tbt); select * from t_book tb where tb.bookTypeId not in (select id from t_bookType tbt);
2. Compare > < ...
select * from t_book tb where tb.price>=(select price from t_pricelevel where priceLevel=1);
3. Exists
select * from t_book where exists (select * from t_bookType); select * from t_book where not exists (select * from t_bookType);
4. Any
select * from t_book where price >= any (select price from t_pricelevel);
5. All
select * from t_book where price >= all (select price from t_pricelevel);
相关文章推荐
- MySQL_Table_Union_Query_Alias
- UITableView中不同cell工厂化处理
- iOS中UIView半边圆角设置
- Leetcode #62. Unique Paths 路径搜寻 解题报告
- UVA 11039 Building designing
- hdu——1711Number Sequence(kmp专练)
- Java集合的Stack、Queue、Map的遍历
- UITableView 01
- 347. Top K Frequent Elements-获得前K高次元素
- UIWindow
- iOS开发报错CUICatalog: Invalid asset name supplied: (null)
- UI进阶 数据处理之文件读写
- Rescue HDU1242 (BFS+优先队列)
- FZU 2037 Maximum Value Problem【递推】
- This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery' 错误解决
- POJ 2524 Ubiquitous Religions
- 让多语言本地化变得更简单的Xcode插件——AMLocalizedStringBuilder
- 【arduino】通过Esp8266-01模块实现的WiFi通信(2)与电脑的连接和烧写
- "围观"设计模式(9)--创建型之创建者模式(Builder Pattern)
- [暴力] BZOJ 3917 [Baltic2014]sequence