if exists (select * from sys.databases where name = ’数据库名’) drop database [数据库名] if exists (select * from sys.objects where id = object_id(N’[表名]’) ) drop table [表名] create database mydb go use mydb create table student1