加号的两种用法:1.在SELECT子句中使用+号以执行对数据的运算并将结果显示出来。 SELECT ITEM WHOLESALEWHOLESALE+0.15 FROM PRICE; 还可以重命名新增的列 2.在WHERE子句中使用加号,在WHERE子句中使用操作符可以在当你对数据有特定条件时具有.....
                            
                            
                                分类:
数据库   时间:
2016-01-13 19:36:47   
                                阅读次数:
311
                             
                    
                        
                            
                            
                                Say you have an array for which theithelement is the price of a given stock on dayi.If you were only permitted to complete at most one transaction (ie...
                            
                            
                                分类:
其他好文   时间:
2016-01-12 15:20:29   
                                阅读次数:
112
                             
                    
                        
                            
                            
                                Say you have an array for which theithelement is the price of a given stock on dayi.If you were only permitted to complete at most one transaction (ie...
                            
                            
                                分类:
其他好文   时间:
2016-01-11 17:50:28   
                                阅读次数:
129
                             
                    
                        
                            
                            
                                Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete a...
                            
                            
                                分类:
其他好文   时间:
2016-01-11 17:43:12   
                                阅读次数:
142
                             
                    
                        
                            
                            
                                Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may comple...
                            
                            
                                分类:
其他好文   时间:
2016-01-10 19:48:27   
                                阅读次数:
132
                             
                    
                        
                            
                            
                                class Book{ private String title ; private double price ; public Book(String title , double price ){ this.title = title ; this.price = price ; } publi...
                            
                            
                                分类:
编程语言   时间:
2016-01-10 18:23:46   
                                阅读次数:
161
                             
                    
                        
                            
                            
                                //最大值select max(price) max,date from on_jiaoyi_into group by date//最小值select min(price) min,date from on_jiaoyi_into group by date//开盘价select a.price,...
                            
                            
                                分类:
其他好文   时间:
2016-01-09 22:53:45   
                                阅读次数:
217
                             
                    
                        
                            
                            
                                五个统计函数(单独使用,意义不大,经常和分组groupby组合使用)max最大selectmax(shop_price)fromgoods;min最小selectmin(shop_price)fromgoods;sum求和selectsum(shop_price)fromgoods;avg求平均值selectavg(shop_price)fromgoods;count所有值得行数有多少行count(*)绝对..
                            
                            
                                分类:
数据库   时间:
2016-01-07 18:40:39   
                                阅读次数:
197
                             
                    
                        
                            
                            
                                having查询差价在200以上的列selectgoods_id,(market_price-shop_price)aschajiafromgoodshavingchajia>200;查询挤压的总货款selectsum(goods_number*shop_price)fromgoods;查询每个栏目下的积压货款mysql>selectcat_id,sum(goods_number*shop_price)fromgoodsgroupbycat..
                            
                            
                                分类:
数据库   时间:
2016-01-07 18:40:11   
                                阅读次数:
288
                             
                    
                        
                            
                            
                                orderby排序:在结果集出来之后才有意义必须在where,groupby,having之后desc(降序)/asc(升序)用字段排序用shop_price降序排列selectgoods_name,cat_id,shop_pricefromgoodswherecat_id=4orderbyshop_pricedesc;多个排序选择,先根据cat_id,然后shop_priceselectcat_id,shop_..
                            
                            
                                分类:
数据库   时间:
2016-01-07 18:38:18   
                                阅读次数:
265