锘??xml version="1.0" encoding="utf-8" standalone="yes"?>国产999精品久久,午夜激情成人网,在线xxxxhttp://www.aygfsteel.com/alwayscy/category/20546.htmlzh-cnFri, 04 Sep 2009 01:32:59 GMTFri, 04 Sep 2009 01:32:59 GMT60mysqldump澶囦喚榪樺師MYSQL鏁版嵁搴?/title><link>http://www.aygfsteel.com/alwayscy/archive/2009/03/29/262738.html</link><dc:creator>鎴戠埍浣沖▋</dc:creator><author>鎴戠埍浣沖▋</author><pubDate>Sun, 29 Mar 2009 09:02:00 GMT</pubDate><guid>http://www.aygfsteel.com/alwayscy/archive/2009/03/29/262738.html</guid><wfw:comment>http://www.aygfsteel.com/alwayscy/comments/262738.html</wfw:comment><comments>http://www.aygfsteel.com/alwayscy/archive/2009/03/29/262738.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/alwayscy/comments/commentRss/262738.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/alwayscy/services/trackbacks/262738.html</trackback:ping><description><![CDATA[     鎽樿: mysqldump 鏄噰鐢⊿QL綰у埆鐨勫浠芥満鍒訛紝瀹冨皢鏁版嵁琛ㄥ鎴?SQL 鑴氭湰鏂囦歡錛屽湪涓嶅悓鐨?MySQL 鐗堟湰涔嬮棿鍗囩駭鏃剁浉瀵規瘮杈冨悎閫傦紝榪欎篃鏄渶甯哥敤鐨勫浠芥柟娉曘?nbsp; <a href='http://www.aygfsteel.com/alwayscy/archive/2009/03/29/262738.html'>闃呰鍏ㄦ枃</a><img src ="http://www.aygfsteel.com/alwayscy/aggbug/262738.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/alwayscy/" target="_blank">鎴戠埍浣沖▋</a> 2009-03-29 17:02 <a href="http://www.aygfsteel.com/alwayscy/archive/2009/03/29/262738.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>MYSQL鏇存敼ROOT鐢ㄦ埛瀵嗙爜浠ュ強璁劇疆鏉冮檺http://www.aygfsteel.com/alwayscy/archive/2009/02/12/254387.html鎴戠埍浣沖▋鎴戠埍浣沖▋Thu, 12 Feb 2009 06:31:00 GMThttp://www.aygfsteel.com/alwayscy/archive/2009/02/12/254387.htmlhttp://www.aygfsteel.com/alwayscy/comments/254387.htmlhttp://www.aygfsteel.com/alwayscy/archive/2009/02/12/254387.html#Feedback0http://www.aygfsteel.com/alwayscy/comments/commentRss/254387.htmlhttp://www.aygfsteel.com/alwayscy/services/trackbacks/254387.html grant all privileges on *.* to root@'%' identified by 'xxxx';

鍏跺畠鍙傛暟鐨勪緥瀛愶細
grant select,insert,update,delete,create,drop on vtdc.employee to joe@10.163.225.87 identified by '123';

銆銆緇欐潵鑷?0.163.225.87鐨勭敤鎴穓oe鍒嗛厤鍙鏁版嵁搴搗tdc鐨別mployee琛ㄨ繘琛宻elect,insert,update,delete,create,drop絳夋搷浣滅殑鏉冮檺錛屽茍璁懼畾鍙d護涓?23銆?/p>


瑕侀噸鍚竴嬈YSQL鎵嶈兘浣挎湰鍦扮敤鎴峰瘑鐮佺敓鏁堬細

/usr/local/mysql/support-files/mysql.server restart




]]>
ManyToMany鍏崇郴涓紝浣跨敤闈炰富閿仈鍚堢殑鏂規硶http://www.aygfsteel.com/alwayscy/archive/2008/10/27/236920.html鎴戠埍浣沖▋鎴戠埍浣沖▋Mon, 27 Oct 2008 09:30:00 GMThttp://www.aygfsteel.com/alwayscy/archive/2008/10/27/236920.htmlhttp://www.aygfsteel.com/alwayscy/comments/236920.htmlhttp://www.aygfsteel.com/alwayscy/archive/2008/10/27/236920.html#Feedback0http://www.aygfsteel.com/alwayscy/comments/commentRss/236920.htmlhttp://www.aygfsteel.com/alwayscy/services/trackbacks/236920.html闃呰鍏ㄦ枃

]]>
PD11灝忔妧宸?/title><link>http://www.aygfsteel.com/alwayscy/archive/2008/02/03/179167.html</link><dc:creator>鎴戠埍浣沖▋</dc:creator><author>鎴戠埍浣沖▋</author><pubDate>Sun, 03 Feb 2008 07:06:00 GMT</pubDate><guid>http://www.aygfsteel.com/alwayscy/archive/2008/02/03/179167.html</guid><wfw:comment>http://www.aygfsteel.com/alwayscy/comments/179167.html</wfw:comment><comments>http://www.aygfsteel.com/alwayscy/archive/2008/02/03/179167.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/alwayscy/comments/commentRss/179167.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/alwayscy/services/trackbacks/179167.html</trackback:ping><description><![CDATA[     鎽樿:   <a href='http://www.aygfsteel.com/alwayscy/archive/2008/02/03/179167.html'>闃呰鍏ㄦ枃</a><img src ="http://www.aygfsteel.com/alwayscy/aggbug/179167.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/alwayscy/" target="_blank">鎴戠埍浣沖▋</a> 2008-02-03 15:06 <a href="http://www.aygfsteel.com/alwayscy/archive/2008/02/03/179167.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>POSTGRESQL鏁版嵁搴撳湪Windows涓嬩互綆$悊鍛樼敤鎴峰畨瑁呭拰綆鍗曞懡浠?/title><link>http://www.aygfsteel.com/alwayscy/archive/2007/08/12/136174.html</link><dc:creator>鎴戠埍浣沖▋</dc:creator><author>鎴戠埍浣沖▋</author><pubDate>Sun, 12 Aug 2007 07:56:00 GMT</pubDate><guid>http://www.aygfsteel.com/alwayscy/archive/2007/08/12/136174.html</guid><wfw:comment>http://www.aygfsteel.com/alwayscy/comments/136174.html</wfw:comment><comments>http://www.aygfsteel.com/alwayscy/archive/2007/08/12/136174.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/alwayscy/comments/commentRss/136174.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/alwayscy/services/trackbacks/136174.html</trackback:ping><description><![CDATA[     鎽樿: 鏈榪戝洜涓虹敤HYPERIC浜у搧錛岃浜嗕竴涓婸ostgres鏁版嵁搴擄紝涓嬮潰綆璇翠笅鍦╓INDOWS涓嬪畨瑁呯殑鎯呭喌銆?  涓嬭澆閭d釜鐩存帴瑙e帇鐗堬紝瑙e帇 鍦?$PG"鐩綍涓嬪垱寤轟竴涓猺ootpass.txt鏂囦歡錛屽唴瀹逛負鏁版嵁搴撶殑瓚呯駭鐢ㄦ埛瀵嗙爜銆傚彲浠ュ~涓?#8220;p”錛屾柟渚垮悗闈㈢櫥闄嗐傚噯澶囧伐浣滃埌姝ょ粨鏉燂紝涓嬮潰鐨勬楠や互綆$悊鍛樿韓浠芥墽琛屻?縐誨姩DLL鏂囦歡[8.1.5鍙婁互涓婄増鏈笉闇瑕佽繖涓姝ラ]錛?cd...  <a href='http://www.aygfsteel.com/alwayscy/archive/2007/08/12/136174.html'>闃呰鍏ㄦ枃</a><img src ="http://www.aygfsteel.com/alwayscy/aggbug/136174.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/alwayscy/" target="_blank">鎴戠埍浣沖▋</a> 2007-08-12 15:56 <a href="http://www.aygfsteel.com/alwayscy/archive/2007/08/12/136174.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Join鐢ㄦ硶錛孒QL鐨勬柟娉曪紝Hibernate涓殑fetchhttp://www.aygfsteel.com/alwayscy/archive/2007/07/26/132577.html鎴戠埍浣沖▋鎴戠埍浣沖▋Thu, 26 Jul 2007 08:44:00 GMThttp://www.aygfsteel.com/alwayscy/archive/2007/07/26/132577.htmlhttp://www.aygfsteel.com/alwayscy/comments/132577.htmlhttp://www.aygfsteel.com/alwayscy/archive/2007/07/26/132577.html#Feedback1http://www.aygfsteel.com/alwayscy/comments/commentRss/132577.htmlhttp://www.aygfsteel.com/alwayscy/services/trackbacks/132577.html浠ヤ笅鏂囧瓧鎽樿嚜錛?a >JOIN,  JOIN2, HQL, Fetch

Join鐢ㄦ硶:

涓昏鏈塈nner Join 鍙?Outer Join:

 

鏈甯哥敤鐨勶紙榛樿鏄疘nner錛夛細

Select <瑕侀夋嫨鐨勫瓧孌?gt; From <涓昏璧勬枡琛?gt;

銆銆<Join 鏂瑰紡> <嬈¤璧勬枡琛?gt; [On <Join 瑙勫垯>]

Inner Join 鐨勪富瑕佺簿紲炲氨鏄?exclusive , 鍙畠鍋氭帓浠栨у惂! 灝辨槸璁?Join 瑙勫垯涓嶇浉絎︾殑璧勬枡灝變細琚帓闄ゆ帀, 璀璁插湪 Product 涓湁涓欏逛駭鍝佺殑渚涜揣鍟嗕唬鐮?(SupplierId), 娌℃湁鍑虹幇鍦?Suppliers 璧勬枡琛ㄤ腑, 閭d箞榪欑瑪璁板綍渚夸細琚帓闄ゆ帀

 

Outer Join:

Select <瑕佹煡璇㈢殑瀛楁> From <Left 璧勬枡琛?gt;

銆銆<Left | Right> [Outer] Join <Right 璧勬枡琛?gt; On <Join 瑙勫垯>

 

璇硶涓殑 Outer 鏄彲浠ョ渷鐣ョ殑, 渚嬪浣犲彲浠ョ敤 Left Join 鎴栨槸 Right Join, 鍦ㄦ湰璐ㄤ笂, Outer Join 鏄?inclusive, 鍙畠鍋氬寘瀹規у惂! 涓嶅悓浜?Inner Join 鐨勬帓浠栨? 鍥犳鍦?Left Outer Join 鐨勬煡璇㈢粨鏋滀細鍖呭惈鎵鏈?Left 璧勬枡琛ㄧ殑璧勬枡, 棰犲掕繃鏉ヨ, Right Outer Join 鐨勬煡璇㈠氨浼氬寘鍚墍鏈?Right 璧勬枡琛ㄧ殑璧勬枡

 

鍙﹀錛岃繕鏈夊叏澶栬仈錛?

FULL JOIN 鎴?FULL OUTER JOIN

瀹屾暣澶栭儴鑱旀帴榪斿洖宸﹁〃鍜屽彸琛ㄤ腑鐨勬墍鏈夎銆傚綋鏌愯鍦ㄥ彟涓涓〃涓病鏈夊尮閰嶈鏃訛紝鍒欏彟涓涓〃鐨勯夋嫨鍒楄〃鍒楀寘鍚┖鍊箋傚鏋滆〃涔嬮棿鏈夊尮閰嶈錛屽垯鏁翠釜緇撴灉闆嗚鍖呭惈鍩鴻〃鐨勬暟鎹箋?

 

浠ュ強錛?

浜ゅ弶鑱旀帴

浜ゅ弶鑱旀帴榪斿洖宸﹁〃涓殑鎵鏈夎錛屽乏琛ㄤ腑鐨勬瘡涓琛屼笌鍙寵〃涓殑鎵鏈夎緇勫悎銆備氦鍙夎仈鎺ヤ篃縐頒綔絎涘崱灝旂Н銆?

娌℃湁 WHERE 瀛愬彞鐨勪氦鍙夎仈鎺ュ皢浜х敓鑱旀帴鎵娑夊強鐨勮〃鐨勭瑳鍗″皵縐傜涓涓〃鐨勮鏁頒箻浠ョ浜屼釜琛ㄧ殑琛屾暟絳変簬絎涘崱灝旂Н緇撴灉闆嗙殑澶у皬銆備篃灝辨槸璇村湪娌℃湁 WHERE 瀛愬彞鐨勬儏鍐典笅錛岃嫢琛?A 鏈?3 琛岃褰曪紝琛?B 鏈?6 琛岃褰?: 錛?

SELECT A.*,B.* FROM 琛ˋ CROSS JOIN 琛˙

閭d互涓婅鍙ヤ細榪斿洖 18 琛岃褰曘?

 

 

Fetch:

鍦ㄦ垜浠煡璇arent瀵硅薄鐨勬椂鍊欙紝榛樿鍙湁Parent鐨勫唴瀹癸紝騫朵笉鍖呭惈childs鐨勪俊鎭紝濡傛灉鍦≒arent.hbm.xml閲岃緗甽azy="false"鐨勮瘽鎵嶅悓鏃跺彇鍑哄叧鑱旂殑鎵鏈塩hilds鍐呭.
闂鏄垜鏃㈡兂瑕乭ibernate榛樿鐨勬ц兘鍙堟兂瑕佷復鏃剁殑鐏墊椿鎬ц鎬庝箞鍔烇紵  榪欏氨鏄痜etch鐨勫姛鑳姐傛垜浠彲浠ユ妸fetch涓巐azy="true"鐨勫叧緋葷被姣斾負浜嬪姟褰撲腑鐨勭紪紼嬪紡浜嬪姟涓庡0鏄庡紡浜嬪姟,涓嶅お鍑嗙‘錛屼絾鏄ぇ姒傛槸榪欎釜鎰忔濄?br>鎬誨鹼紝fetch灝辨槸鍦ㄤ唬鐮佽繖涓灞傜粰浣犱竴涓富鍔ㄦ姄鍙栧緱鏈轟細.

Parent parent = (Parent)hibernateTemplate.execute(new HibernateCallback() {
public Object doInHibernate(Session session) throws HibernateException, SQLException {
                Query q = session.createQuery(
"from Parent as parent "+
" left outer join fetch parent.childs " +
" where parent.id = :id"
                );
                q.setParameter("id",new Long(15));
return (Parent)q.uniqueResult();
            }
        });
        Assert.assertTrue(parent.getChilds().size() > 0);

浣犲彲浠ュ湪lazy="true"鐨勬儏鍐典笅鎶奻etch鍘繪帀錛屽氨浼氭姤寮傚父. 褰撶劧錛屽鏋渓azy="false"灝變笉闇瑕乫etch浜?

 

 

HQL涓浜涚壒鑹叉柟娉曪細

in and between may be used as follows:

from DomesticCat cat where cat.name between 'A' and 'B'
from DomesticCat cat where cat.name in ( 'Foo', 'Bar', 'Baz' )

and the negated forms may be written

from DomesticCat cat where cat.name not between 'A' and 'B'
from DomesticCat cat where cat.name not in ( 'Foo', 'Bar', 'Baz' )

Likewise, is null and is not null may be used to test for null values.

Booleans may be easily used in expressions by declaring HQL query substitutions in Hibernate configuration:

<property name="hibernate.query.substitutions">true 1, false 0</property>

This will replace the keywords true and false with the literals 1 and 0 in the translated SQL from this HQL:

from Cat cat where cat.alive = true

You may test the size of a collection with the special property size, or the special size() function.

from Cat cat where cat.kittens.size > 0
from Cat cat where size(cat.kittens) > 0

For indexed collections, you may refer to the minimum and maximum indices using minindex and maxindex functions. Similarly, you may refer to the minimum and maximum elements of a collection of basic type using the minelement and maxelement functions.

from Calendar cal where maxelement(cal.holidays) > current_date
from Order order where maxindex(order.items) > 100
from Order order where minelement(order.items) > 10000

The SQL functions any, some, all, exists, in are supported when passed the element or index set of a collection (elements and indices functions) or the result of a subquery (see below).

select mother from Cat as mother, Cat as kit
where kit in elements(foo.kittens)
select p from NameList list, Person p
where p.name = some elements(list.names)
from Cat cat where exists elements(cat.kittens)
from Player p where 3 > all elements(p.scores)
from Show show where 'fizard' in indices(show.acts)

Note that these constructs - size, elements, indices, minindex, maxindex, minelement, maxelement - may only be used in the where clause in Hibernate3.

Elements of indexed collections (arrays, lists, maps) may be referred to by index (in a where clause only):

from Order order where order.items[0].id = 1234
select person from Person person, Calendar calendar
where calendar.holidays['national day'] = person.birthDay
    and person.nationality.calendar = calendar
select item from Item item, Order order
where order.items[ order.deliveredItemIndices[0] ] = item and order.id = 11
select item from Item item, Order order
where order.items[ maxindex(order.items) ] = item and order.id = 11

The expression inside [] may even be an arithmetic expression.

select item from Item item, Order order
where order.items[ size(order.items) - 1 ] = item

HQL also provides the built-in index() function, for elements of a one-to-many association or collection of values.

select item, index(item) from Order order 
    join order.items item
where index(item) < 5

Scalar SQL functions supported by the underlying database may be used

from DomesticCat cat where upper(cat.name) like 'FRI%'


]]>
主站蜘蛛池模板: 蒲江县| 稷山县| 调兵山市| 资溪县| 祥云县| 上林县| 扶风县| 潍坊市| 普格县| 建始县| 故城县| 鲁山县| 平乐县| 巴塘县| 武宁县| 岳阳县| 祥云县| 靖边县| 柞水县| 措美县| 山阳县| 广平县| 谢通门县| 庆阳市| 吐鲁番市| 民乐县| 长武县| 武冈市| 兰西县| 体育| 马山县| 阿尔山市| 西盟| 济源市| 大石桥市| 盐源县| 秦皇岛市| 常宁市| 尼木县| 甘德县| 明水县|