当前位置:操作系统 > Unix/Linux >>

数据库上机实验学习记录

数据库上机实验学习记录
 
[sql] 
create table student  
(  
    Sno char(9) primary key,  
    Sname char(20) unique,  
    S易做图 char(2),  
    Sage smallint,  
    Sdept char(20)  
  
);  
  
//查询  
select Sno,Sname,S易做图,Sage,Sdept from student where Sname='wy';  
  
//插入  
insert into student values('3','dh','v','12','jg');  
insert into student values('4','fg','n','45','sp');  
  
insert into student values('5','hg','n','25','dp');  
insert into student values('6','fg','v','55','ep');  
insert into student values('7','rg','n','66','tp');  
//删除  
delete Student where Sname='hg';  
  
  
//更新  
update student set Sname='zl' where Sname='fg' and S易做图='n';  

 


CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,