use DataBaseName go if not OBJECT_ID('[Employees]') is Null Drop Table [Employees] go Create Table [Employees] (ID int Primary Key Identity(1,1), [Name] Nvarchar(50) Not Null, [Title] Nvarchar(50) Null, [Phone] int Null, [City] Nvarchar(20)) go Insert Into [Employees] select '张三', '采购经理', 1234567, '北京' Union All select '李四', '销售', 7654321, '上海' Union All select '王小', '前台', 1230000, '上海' select * from [Employees] where [City] = '上海'
相关文章: