-- insert into people values (1, 'lily', 'f', 12) -- insert into people values (2, 'chao', 'm', 16) -- insert into people values (3, 'alin', 'f',null)
selectid, namefrom people
-- order by selectname, age from people orderby age desc,id
-- order by number selectname, age from people orderby2--2 means age
-- isnull() selectname, ISNULL (age, '') from people
--alias selectname, ISNULL (age, '') as a from people
-- concat strings select'people ' + TRIM (name) + ' is age of ' + convert(varchar, isnull(age, '')) as [description] from people
-- round() select age, age * 10as'age10', round(convert(float,age)/8, 1) as'ageD8', round(age/3, 0) as'ageD3' from people
-- where select * from people where age <> 12
-- and or -- select date from time where data between '2005-10-10' and '1/1/2006' select * from people whereid = 2orid = 3 select * from people wherename = 'chao'and age =16
-- wildcard % like select * from people wherenamelike'%h%'
-- _ single character select * from people wherenamelike'_hao%'
-- in select * from people where age in (14,16)
-- not in select * from people where age notin (16)
-- is null select * from people where age isnull
-- is not null select * from people where age isnotnull