标签:http io ar for 数据 sp div art c
select * from ItemMasters-- Aggregate-- COUNT() -> returns the Total no of records from table , AVG() returns the Average Value from Colum,MAX() Returns MaX Value from Column-- ,MIN() returns Min Value from Column,SUM() sum of total from ColumnSelect Count(*) TotalRows,AVG(Price) AVGPrice,MAX(Price) MAXPrice,MIN(Price) MinPrice,Sum(price) PriceTotalFROM ItemMasters-- Scalar-- UCASE() -> Convert to Upper Case ,LCASE() -> Convert to Lower Case,-- SUBSTRING() ->Display selected char from column ->SUBSTRING(ColumnName,StartIndex,LenthofChartoDisplay)--,LEN() -> lenth of column date,-- ROUND() -> Which will round the valueSELECT UPPER(Item_NAME) Uppers,LOWER(Item_NAME) Lowers,SUBSTRING(Item_NAME,2,3) MidValue,LEN(Item_NAME) Lenths,SUBSTRING(Item_NAME,2,LEN(Item_NAME)) MidValuewithLenFunction,ROUND(Price,0) as RoundedFROM ItemMasters
标签:http io ar for 数据 sp div art c
原文地址:http://www.cnblogs.com/yeyong/p/4010778.html