HQL查询语言的使用介绍


当前第2页 返回上一页

结果:

log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.
Hibernate:
    select
        user0_.id as id0_,
        user0_.username as username0_,
        user0_.password as password0_
    from
        users.user user0_
    where
        user0_.id not between 200 and 2000
1hongten
2hanyuan
3hongwei
4mingliu
5shouzhang
Hibernate:
    select
        user0_.username as col_0_0_
    from
        users.user user0_
    where
        user0_.id=2
hanyuan
Hibernate:
    select
        user0_.id as id0_,
        user0_.username as username0_,
        user0_.password as password0_
    from
        users.user user0_
    where
        user0_.username in (
            'Hongten' , 'Hanyuan' , 'dfgd'
        )
1hongten
2hanyuan
Hibernate:
    select
        user0_.id as id0_,
        user0_.username as username0_,
        user0_.password as password0_
    from
        users.user user0_
    where
        user0_.username not like 'Hon%'
2hanyuan
4mingliu
5shouzhang
Hibernate:
    select
        user0_.id as id0_,
        user0_.username as username0_,
        user0_.password as password0_
    from
        users.user user0_
    where
        user0_.password is null
Hibernate:
    select
        user0_.id as id0_,
        user0_.username as username0_,
        user0_.password as password0_
    from
        users.user user0_
    where
        (
            user0_.password is not null
        )
        and user0_.id<5
1hongten123
2hanyuan5645645
3hongwei5645645
4mingliu5645645
Hibernate:
    select
        user0_.id as id0_,
        user0_.username as username0_,
        user0_.password as password0_
    from
        users.user user0_
    order by
        user0_.username,
        user0_.id desc
2hanyuan
1hongten
3hongwei
4mingliu
5shouzhang
Hibernate:
    select
        user0_.username as col_0_0_
    from
        users.user user0_
    where
        user0_.username=?
hongten
Hibernate:
    select
        user0_.username as col_0_0_
    from
        users.user user0_
hongten
hanyuan
hongwei
mingliu
shouzhang
-------------------------------------------
Hibernate:
    select
        lower(user0_.username) as col_0_0_
    from
        users.user user0_
hongten
hanyuan
hongwei
mingliu
shouzhang
Hibernate:
    update
        users.user
    set
        username='Hongwei1231'
    where
        id=?
1
Hibernate:
    select
        user0_.id as id0_0_,
        profile1_.id as id1_1_,
        user0_.username as username0_0_,
        user0_.password as password0_0_,
        profile1_.user_id as user2_1_1_,
        profile1_.email as email1_1_,
        profile1_.phone as phone1_1_,
        profile1_.mobile as mobile1_1_,
        profile1_.address as address1_1_,
        profile1_.postcode as postcode1_1_
    from
        users.user user0_,
        users.profile profile1_
ID :1,UserName:hongten,Password:123hongtenzone@foxmail.com45464Guangzhoushi65465
ID :1,UserName:hongten,Password:123hanyuan@foxmail.com45648255GuangzhoushiDianbian65465
ID :1,UserName:hongten,Password:123hanyuan@foxmail.com45648255GuangzhoushiDianbian65465
ID :2,UserName:hanyuan,Password:5645645hongtenzone@foxmail.com45464Guangzhoushi65465
ID :2,UserName:hanyuan,Password:5645645hanyuan@foxmail.com45648255GuangzhoushiDianbian65465
ID :2,UserName:hanyuan,Password:5645645hanyuan@foxmail.com45648255GuangzhoushiDianbian65465
ID :3,UserName:Hongwei1231,Password:5645645hongtenzone@foxmail.com45464Guangzhoushi65465
ID :3,UserName:Hongwei1231,Password:5645645hanyuan@foxmail.com45648255GuangzhoushiDianbian65465
ID :3,UserName:Hongwei1231,Password:5645645hanyuan@foxmail.com45648255GuangzhoushiDianbian65465
ID :4,UserName:mingliu,Password:5645645hongtenzone@foxmail.com45464Guangzhoushi65465
ID :4,UserName:mingliu,Password:5645645hanyuan@foxmail.com45648255GuangzhoushiDianbian65465
ID :4,UserName:mingliu,Password:5645645hanyuan@foxmail.com45648255GuangzhoushiDianbian65465
ID :5,UserName:shouzhang,Password:5645645hongtenzone@foxmail.com45464Guangzhoushi65465
ID :5,UserName:shouzhang,Password:5645645hanyuan@foxmail.com45648255GuangzhoushiDianbian65465
ID :5,UserName:shouzhang,Password:5645645hanyuan@foxmail.com45648255GuangzhoushiDianbian65465
Hibernate:
    select
        profile0_.id as id1_0_,
        user1_.id as id0_1_,
        profile0_.user_id as user2_1_0_,
        profile0_.email as email1_0_,
        profile0_.phone as phone1_0_,
        profile0_.mobile as mobile1_0_,
        profile0_.address as address1_0_,
        profile0_.postcode as postcode1_0_,
        user1_.username as username0_1_,
        user1_.password as password0_1_
    from
        users.profile profile0_
    inner join
        users.user user1_
            on profile0_.user_id=user1_.id
ID:1   Username: hongten   Email: hongtenzone@foxmail.com,   Address: Guangzhoushi
ID:2   Username: hanyuan   Email: hanyuan@foxmail.com,   Address: GuangzhoushiDianbian
ID:3   Username:Hongwei1231   Email: hanyuan@foxmail.com,   Address: GuangzhoushiDianbian
Hibernate:
    select
        this_.id as id1_1_,
        this_.user_id as user2_1_1_,
        this_.email as email1_1_,
        this_.phone as phone1_1_,
        this_.mobile as mobile1_1_,
        this_.address as address1_1_,
        this_.postcode as postcode1_1_,
        user1_.id as id0_0_,
        user1_.username as username0_0_,
        user1_.password as password0_0_
    from
        users.profile this_
    inner join
        users.user user1_
            on this_.user_id=user1_.id
ID:1   Username: hongten   Email: hongtenzone@foxmail.com,   Address: Guangzhoushi
ID:2   Username: hanyuan   Email: hanyuan@foxmail.com,   Address: GuangzhoushiDianbian
ID:3   Username: Hongwei1231   Email: hanyuan@foxmail.com,   Address: GuangzhoushiDianbian
##################################################
Hibernate:
    select
        this_.id as id1_1_,
        this_.user_id as user2_1_1_,
        this_.email as email1_1_,
        this_.phone as phone1_1_,
        this_.mobile as mobile1_1_,
        this_.address as address1_1_,
        this_.postcode as postcode1_1_,
        user2_.id as id0_0_,
        user2_.username as username0_0_,
        user2_.password as password0_0_
    from
        users.profile this_
    left outer join
        users.user user2_
            on this_.user_id=user2_.id
ID:1   Username: hongten   Email: hongtenzone@foxmail.com,   Address: Guangzhoushi
ID:2   Username: hanyuan   Email: hanyuan@foxmail.com,   Address: GuangzhoushiDianbian
ID:3   Username: 洪伟1231   Email: hanyuan@foxmail.com,   Address: GuangzhoushiDianbian
Hibernate:
    select
        profile0_.id as id1_0_,
        user1_.id as id0_1_,
        profile0_.user_id as user2_1_0_,
        profile0_.email as email1_0_,
        profile0_.phone as phone1_0_,
        profile0_.mobile as mobile1_0_,
        profile0_.address as address1_0_,
        profile0_.postcode as postcode1_0_,
        user1_.username as username0_1_,
        user1_.password as password0_1_
    from
        users.profile profile0_
    left outer join
        users.user user1_
            on profile0_.user_id=user1_.id
    order by
        profile0_.user_id
ID:1   Username: hongten   Email: hongtenzone@foxmail.com,   Address: Guangzhoushi
ID:2   Username: hanyuan   Email: hanyuan@foxmail.com,   Address: GuangzhoushiDianbian
ID:3   Username: 洪伟1231   Email: hanyuan@foxmail.com,   Address: GuangzhoushiDianbian
-------------------------------------
Hibernate:
    select
        user0_.id as id0_0_,
        profiles1_.id as id1_1_,
        user0_.username as username0_0_,
        user0_.password as password0_0_,
        profiles1_.user_id as user2_1_1_,
        profiles1_.email as email1_1_,
        profiles1_.phone as phone1_1_,
        profiles1_.mobile as mobile1_1_,
        profiles1_.address as address1_1_,
        profiles1_.postcode as postcode1_1_,
        profiles1_.user_id as user2_0__,
        profiles1_.id as id0__
    from
        users.user user0_
    left outer join
        users.profile profiles1_
            on user0_.id=profiles1_.user_id
1hongten[com.b510.example.Profile@14eaec9]
2hanyuan[com.b510.example.Profile@569c60]
3Hongwei1231[com.b510.example.Profile@d67067]
4mingliu[]
5shouzhang[]
Hibernate:
    select
        user0_.id as id0_,
        user0_.username as username0_,
        user0_.password as password0_
    from
        users.user user0_
    right outer join
        users.profile profiles1_
            on user0_.id=profiles1_.user_id
    order by
        user0_.id
Hibernate:
    select
        profiles0_.user_id as user2_1_,
        profiles0_.id as id1_,
        profiles0_.id as id1_0_,
        profiles0_.user_id as user2_1_0_,
        profiles0_.email as email1_0_,
        profiles0_.phone as phone1_0_,
        profiles0_.mobile as mobile1_0_,
        profiles0_.address as address1_0_,
        profiles0_.postcode as postcode1_0_
    from
        users.profile profiles0_
    where
        profiles0_.user_id=?
1hongten[com.b510.example.Profile@10c0f66]
Hibernate:
    select
        profiles0_.user_id as user2_1_,
        profiles0_.id as id1_,
        profiles0_.id as id1_0_,
        profiles0_.user_id as user2_1_0_,
        profiles0_.email as email1_0_,
        profiles0_.phone as phone1_0_,
        profiles0_.mobile as mobile1_0_,
        profiles0_.address as address1_0_,
        profiles0_.postcode as postcode1_0_
    from
        users.profile profiles0_
    where
        profiles0_.user_id=?
2hanyuan[com.b510.example.Profile@e265d0]
Hibernate:
    select
        profiles0_.user_id as user2_1_,
        profiles0_.id as id1_,
        profiles0_.id as id1_0_,
        profiles0_.user_id as user2_1_0_,
        profiles0_.email as email1_0_,
        profiles0_.phone as phone1_0_,
        profiles0_.mobile as mobile1_0_,
        profiles0_.address as address1_0_,
        profiles0_.postcode as postcode1_0_
    from
        users.profile profiles0_
    where
        profiles0_.user_id=?
3Hongwei1231[com.b510.example.Profile@8997d1]


标签:SQL

返回前面的内容

相关阅读 >>

sql server 2014安装教程

从python读取sql的实例方法

sql cast,convert,quotename,exec 函数学习记录

sql注入攻击的原理

sql server 索引维护sql语句

探讨如何计算age的sql函数

sql function 自定义函数详解

mysql多表查询详解下

sql和access哪个好?

sql语言具有的功能

更多相关阅读请进入《sql》频道 >>


数据库系统概念 第6版
书籍

数据库系统概念 第6版

机械工业出版社

本书主要讲述了数据模型、基于对象的数据库和XML、数据存储和查询、事务管理、体系结构等方面的内容。



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...