select top 100 * from [dbo].[Inf_Hotel] where id not in(select top 300 id from Inf_Hotel) order by id desc select count(*) from Inf_Hotel where tel is not null alter table Inf_Hotel alter column Tel varchar(500) create table Inf_Catalog ( ID int primary key identity(1,1) not null, Code varchar(50) null, Name varchar(100) null, Value varchar(100) null ) select * from Inf_Catalog
select * from his_domain where type='cn' and len(domain)=3 and domain not like'%[0-9]%' and domain not like'%-%' SELECT * into inf_domain FROM inf_domain20150914 WHERE 1=2 ALTER TABLE inf_domain ADD CONSTRAINT PK_inf_domain PRIMARY KEY (id) select * from inf_domain where len(domain)=3 and domain not like'%-%' select * from inf_domain where domain like'%azun%' select * from inf_domain where domain='zzzzz' select convert(varchar(10),dateadd(d,-6,getdate()),112) select * from his_domain select count(*) from his_domain --declare @sql varchar(500) --set @sql='insert into his_domain select domain,type,length,dtDelete,dtCreate,isRegister from inf_domain'+convert(varchar(10),dateadd(d,-5,getdate()),112)+';drop table inf_domain'+convert(varchar(10),dateadd(d,-5,getdate()),112) --exec(@sql) select count(*) from sysobjects where name='inf_domain'+convert(varchar(10),getdate(),112) and type='U' select * from inf_domain20150921 where len(domain)=3 and type='net' and domain not like'%[0-9]%' and domain not like'%-%'
create table Inf_City ( ID int PRIMARY KEY IDENTITY(1,1) not null, name varchar(20) not null, pinyin varchar(20) null, acronym varchar(20) null ) select * from Inf_City create table Inf_Hotel ( ID int PRIMARY KEY IDENTITY(1,1) not null, Name varchar(100) null, Address varchar(500) null, Tel varchar(20) null, Info varchar(500) null, Description varchar(max) null, Build varchar(500) null, Service varchar(max) null, Facility varchar(max), ) alter table Inf_Hotel add Style varchar(50) alter table Inf_Hotel add CityPY varchar(50),CityName varchar(50) create table Inf_DealList ( ID int PRIMARY KEY IDENTITY(1,1) not null, HotelID int null, Name varchar(100) null, Breakfast varchar(500) null, WIFI varchar(50) null, Condition varchar(500) null ) select * from Inf_Hotel
update inf_Customer set balanceAccount = 'jzinfo_s_test' where customercode='test001'
记录一下