How to use PL SQL Developer in Ubuntu
You can user PL SQL Developer in Ubuntu like in Windows:
1.download PL/SQL Developer for linux;
2.Install JDK berfore the next;
3.install the PL/SQL Developer;
4.goto the $PL/SQL Developer,run sh sqldeverloper.sh;
5.type the $JDK;
6.then the PL/SQL Developer will startup.
相关文档:
--
> 测试数据:[tb]
if
object_id
(
'
[tb]
'
)
is
not
null
drop
table
[
tb
]
go
create
table
[
tb
]
(
[
id
]
int
,
[
lx
]
int
)
insert
[
tb
]
select
29
,
2
union
all
select
30
,
3
union
all
sel ......
自连接是指一个表与其自身进行连接。
举一个简单的实例,一个学生课程成绩表StudentScore,其中包括学生编号/studentid,所选课程/coursename,课程成绩/score
选择每门课程的前两名学生,并将他信息输出出来
此时你的第一反应就是要把学生按所选课程进行分组,然后比较获得每门课程里面前两位的学生
分组的方式有group b ......
/*sql重复数据处理,有唯一ID,formid有重复*/
/*查出重复的fromid*/
select formid from GaiaSaver_BUG group by formid having count(*)>1
/*删除重复formid,只留一条*/
delete from GaiaSaver_BUG where ID not in
(select min(ID) as ID from GaiaSaver_BUG group by for ......
从功能上划分,SQL语言可以分为DDL,DML和DCL三大类。
1. DDL(Data Definition Language)
数据定义语言,用于定义和管理 SQL 数据库中的所有对象的语言 ;
CREATE---创建表
ALTER---修改表
  ......
本文转载: http://hi.baidu.com/%D2%BB%C6%F0%C8%A5%CC%DF%C7%F2/blog/item/802027355899fe83a61e12ee.html
使用SQLQuery
对原生SQL查询执行的控制是通过SQLQuery接口进行的,通过执行Session.createSQLQuery
()
获取这个接口。最简单的情况下,我们可以采用以下形式:
List
cats
=
sess.createSQLQuery
(
......