建表脚本:
CREATE TABLE [dbo].[test](
[city] [varchar](20) NULL,
[Location] [varchar](20) NULL,
[cityroad] [varchar](20) NULL,
[price] [money] NULL,
[phone] [nchar](15) NULL
) ON [PRIMARY]insert test(city,Location,cityroad,price,phone) values ('上海市','南京路步行街','南京路',80.00,'13737489982')
insert test(city,Location,cityroad,price,phone) values ('上海市','城隍庙','东京路',200.00,' 18938374788 ')
insert test(city,Location,cityroad,price,phone) values ('上海市','外滩','人民路',50.00,'13893948493838')
insert test(city,Location,cityroad,price,phone) values ('北京市','长城','赵子龙路',225.00,'18920303033')
insert test(city,Location,cityroad,price,phone) values ('北京市','故宫','长安街',300.00,' 1582912838')
insert test(city,Location,cityroad,price,phone) values ('北京市','王府井','首都路',70.00,' 1888203930 ')
insert test(city,Location,cityroad,price,phone) values ('深圳市','帝国大厦','改革路',199.00,'1 3728 2919 28 ')
insert test(city,Location,cityroad,price,phone) values ('深圳市','深圳欢乐谷','快乐路',220.00,'1342829290-')
insert test(city,Location,cityroad,price,phone) values ('深圳市','深圳世界之窗','香港路',40.00,'18729838384')
insert test(city,Location,cityroad,price,phone) values ('海南市','天涯海角','穷途末路',15.00,'18738393933')
insert test(city,Location,cityroad,price,phone) values ('海南市','真人美人鱼','海风路',150.00,'13683883000')
insert test(city,Location,cityroad,price,phone) values ('海南市','椰子大道','椰树路',80.00,'18739283829 ')
得到如下结果:
CREATE TABLE [dbo].[test](
[city] [varchar](20) NULL,
[Location] [varchar](20) NULL,
[cityroad] [varchar](20) NULL,
[price] [money] NULL,
[phone] [nchar](15) NULL
) ON [PRIMARY]insert test(city,Location,cityroad,price,phone) values ('上海市','南京路步行街','南京路',80.00,'13737489982')
insert test(city,Location,cityroad,price,phone) values ('上海市','城隍庙','东京路',200.00,' 18938374788 ')
insert test(city,Location,cityroad,price,phone) values ('上海市','外滩','人民路',50.00,'13893948493838')
insert test(city,Location,cityroad,price,phone) values ('北京市','长城','赵子龙路',225.00,'18920303033')
insert test(city,Location,cityroad,price,phone) values ('北京市','故宫','长安街',300.00,' 1582912838')
insert test(city,Location,cityroad,price,phone) values ('北京市','王府井','首都路',70.00,' 1888203930 ')
insert test(city,Location,cityroad,price,phone) values ('深圳市','帝国大厦','改革路',199.00,'1 3728 2919 28 ')
insert test(city,Location,cityroad,price,phone) values ('深圳市','深圳欢乐谷','快乐路',220.00,'1342829290-')
insert test(city,Location,cityroad,price,phone) values ('深圳市','深圳世界之窗','香港路',40.00,'18729838384')
insert test(city,Location,cityroad,price,phone) values ('海南市','天涯海角','穷途末路',15.00,'18738393933')
insert test(city,Location,cityroad,price,phone) values ('海南市','真人美人鱼','海风路',150.00,'13683883000')
insert test(city,Location,cityroad,price,phone) values ('海南市','椰子大道','椰树路',80.00,'18739283829 ')
得到如下结果:
from test where price>=150
from
test
where price>150
这个price的部分根据你的需要进行设定。