資料操作指令

2021-10-11 17:44:39 字數 2037 閱讀 5928

查詢系列

字段 like concat (

'%',

'sd'

,'%'

)

concat ( extract (

month

from 時間字段)

,'-'

, extract (

dayfrom 時間字段)

)as 字段

substring ( to_char( 字段,

'yyyy-mm-dd hh24:mi:ss'),

12,5)

as 字段

left

( 字段, length ( 字段)-1

)as 字段

sum

( to_number( 字段,

'最大整數值.最大小數值'))

as 字段

(

case 字段 when 條件 then 真 else 假 end)as

value

,

字段 between

current_date-7

andcurrent_date

字段》= date_trunc(

'day'

,current_date

)

to_char(字段,

'yyyy-mm-dd')=

'2020-12-09'

字段 between to_date(

'2020-12-09'

,'yyyy-mm-dd'

)and to_date(

'2020-12-12'

,'yyyy-mm-dd'

)

select

distinct

left

( j.roomnum, length ( j.roomnum )-1

)as station,

j.transnum as transmitterid,

(case j.transstatus when

1then

1else

0end

)as genre,

substring ( to_char( j.

time

,'yyyy-mm-dd hh24:mi:ss'),

12,5)

as"time",1

as ws

from

get_transdata as j,

xml_push_broadstatuschangereport as x

where j.

time

>= date_trunc(

'day'

,current_date

)union

allselect

distinct

x.station,

x.transmitterid as transmitterid,

(case x.genre when

1then

1else

0end

)as genre,

substring ( to_char( x.startcheckttime,

'yyyy-mm-dd hh24:mi:ss'),

12,5)

astime,2

as ws

from xml_push_broadstatuschangereport as x,

get_transdata as j

where x.startcheckttime >= date_trunc(

'day'

,current_date

)order

by"time"

desc

資料庫許可權操作指令

登入資料庫 mysql u賬號 p密碼 p埠 h ip命名建立賬號 create user 賬號 host identified by 密碼 建立未授權的賬號,host處建議使用 對ip位址沒有限制 如果後期只能本地訪問,授權後可以修改 3.刪除賬號 賬號是乙個聯合主鍵,刪除的時候,需要指定賬號和h...

組合語言資料傳送指令之堆疊操作指令

處理器通常用硬體支援堆疊 stack 資料結構,它是乙個按 先進後出 first in lastout,filo 訪問原則組織的儲存區域,也可以說是 後進先出 last in first out,lifo 訪問原則。堆疊具有兩種基本操作,對應兩條基本指令 資料壓進堆疊操作對應進棧指令push 資料彈...

VIM操作指令

進入輸入模式 i 在游標左方進入輸入模式 i 在游標所在行的行首進入輸入模式 a 在游標右方進入輸入模式 a 在游標所在行的行尾進入輸入模式 移動游標 k 也就是方向鍵的 j 也就是方向鍵的 h 也就是方向鍵的 l 也就是方向鍵的 h 將游標移至螢幕頂端 m 將游標移至螢幕 l 將游標移至螢幕底端g...