初学者请进
输入create database testDB——>执行
右键点击数据库刷新
就会看到新建的数据库,清空后输入
use testDB
create table testTable(p1 char(5))
执行——>刷新后就会看到新建的表
再点执行时会提示表已经存在,此时可以修改为
use testDB
drop table testTable;
create table testTable(p1 char(5));
然后输入insert into testTable(p1) values('123');
——>执行;打开表会看到已经插入新值
2、
创建一个和已有表结构相同的空表
清空后输入
select * into newTable from testTable where 0=1
执行——>刷新,就会看到一个新的空表
或者select * into newTable from testTable where p1='123',
就会把原表中符合条件的复制到新表中