oracle创建表

创建stu这个表

创建完表后先执行,选中create table stu(); ,先执行,再选中select * from stu;,这样就完成stu表的创建,一定要先执行create table stu();   

create table stu(
  stuid number primary key, 主键
  stuName varchar2(10),
  chassId number(10),
  age number,
  gender varchar2(10),
  address varchar2(50),
  phone number(11),
  email varchar2(25)
  );

select * from stu;

commit;   commit相当于提交按钮,可写可不写,不写就用上面的执行按钮是一样的

新增数据

 insert into stu values(1,'牛小龙',1,21,'男','北京',15090587487,'[email protected]');
  insert into stu values(2,'张晓',2,22,'男','上海',13254458741,'[email protected]');
  insert into stu values(3,'孙力',1,18,'男','厦门',16587458741,'[email protected]');
  insert into stu values(4,'杨昆',3,20,'男','福建',1215458741,'[email protected]');
  insert into stu values(5,'李梅',2,23,'女','上海',1784458741,'[email protected]');

你可能感兴趣的:(oracle,数据库)