W3Cschool
恭喜您成為首批注冊(cè)用戶
獲得88經(jīng)驗(yàn)值獎(jiǎng)勵(lì)
orientdb {db = demo}>SELECT out() from Vehicle
如果上面的查詢執(zhí)行成功,你會(huì)得到下面的輸出。
---+----------+--------- # | @class | out ---+----------+--------- 0 | Vehicle | #11:2 1 | Vehicle | #13:1 2 | Vehicle | #13:4 ---+----------+---------
執(zhí)行以下查詢以從頂點(diǎn)#11:3獲取傳入和傳出頂點(diǎn)。
orientdb {db = demo}>SELECT both() FROM #11:3
如果上面的查詢執(zhí)行成功,你會(huì)得到下面的輸出。
---+----------+--------+------- # | @class | out | in ---+----------+--------+------- 0 | Vehicle | #13:2 | #10:2 ---+----------+-------+-------
orientdb {db = demo}>SELECT SUM(salary) FROM Employee
如果上面的查詢執(zhí)行成功,你會(huì)得到下面的輸出。
---+----------+--------- # | @CLASS | sum ---+----------+--------- 0 | null | 150000 ---+----------+---------
執(zhí)行以下查詢來獲取所有員工的平均工資。
orientdb {db = demo}>SELECT avg(salary) FROM Employee
如果上面的查詢執(zhí)行成功,你會(huì)得到下面的輸出。
---+----------+--------- # | @CLASS | avg ---+----------+--------- 0 | null | 25 ---+----------+---------
orientdb {db = demo}>SELECT ID, set(teacher.id) AS teacherID from classess where class_id = 9
如果上面的查詢執(zhí)行成功,你會(huì)得到下面的輸出。
---+----------+--------+-------------------------- # | @CLASS | id | TeacherID ---+----------+--------+-------------------------- 0 | null | 9 | 1201, 1202, 1205, 1208 ---+----------+-------+---------------------------
orientdb {db = demo}> SELECT if(eval("name = 'satish'"), "My name is satish", "My name is not satish") FROM Employee
如果上面的查詢執(zhí)行成功,你會(huì)得到下面的輸出。
----+--------+----------------------- # |@CLASS | IF ----+--------+----------------------- 0 |null |My name is satish 1 |null |My name is not satish 2 |null |My name is not satish 3 |null |My name is not satish 4 |null |My name is not satish ----+--------+------------------------
執(zhí)行以下查詢來獲取系統(tǒng)日期。
orientdb {db = demo}> SELECT SYSDATE() FROM Employee
如果上面的查詢執(zhí)行成功,你會(huì)得到下面的輸出。
----+--------+----------------------- # |@CLASS | SYSDATE ----+--------+----------------------- 0 |null |2016-02-10 12:05:06 1 |null |2016-02-10 12:05:06 2 |null |2016-02-10 12:05:06 3 |null |2016-02-10 12:05:06 4 |null |2016-02-10 12:05:06 ----+--------+------------------------
利用此功能完全可以很容易地操縱OrientDB數(shù)據(jù)。
Copyright©2021 w3cschool編程獅|閩ICP備15016281號(hào)-3|閩公網(wǎng)安備35020302033924號(hào)
違法和不良信息舉報(bào)電話:173-0602-2364|舉報(bào)郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號(hào)
聯(lián)系方式:
更多建議: