常用三种数据库(sql service,mysql ,oracle)的数据备份
--数据备份
--oraclecreate table studentback as select *from student--mysqlcreate table studentbackselect *from student--SQL serviceselect *into studentbackfrom student
--查询4-6条数据库
select *from( select temp.*,rownum rn from ( select *from student )temp where rownum<=6)where rn >=4--查询id=2的用户的数据select *from(select name,age,address,rownum rn from student)tempwhere rn=2--查询name,age均不重复的数据记录--利用分组 获取信息select name,age,count(name|| age) from student group by name,agehaving (count(name|| age)<2)
--查询不重复的学生信息
select distinct id,name,age,address from student