側麵圖條款

適用於:檢查標記是的磚的SQL檢查標記是的磚運行時

與發電機一起使用等功能爆炸,它生成一個虛擬表包含一個或多個行。橫向視圖行適用於每個原始輸出行。

在磚SQL和磚開始運行時的12.2這一條款是棄用。你應該調用表生成器函數作為價值table_reference

語法

橫向視圖(]generator_function(表達式(,])(table_identifier]作為column_identifier(,]

參數

  • 如果指定,返回null如果輸入數組/地圖是空的或null。

  • generator_function

    生成器函數(爆炸、內聯等)。

  • table_identifier

    的別名generator_function,這是可選的。

  • column_identifier

    列表的列別名generator_function,這可能是用於輸出行。的數量列標識符必須匹配返回的列數發生器的功能。

例子

>創建(idINT,的名字字符串,年齡INT,INT,地址字符串);>插入(One hundred.,“約翰。”,30.,1,“街1”),(200年,“瑪麗”,,1,《街頭2》),(300年,“邁克”,80年,3,“街3”),(400年,“丹”,50,4,“街4”);>選擇*橫向視圖爆炸(數組(30.,60))的表作為c_age橫向視圖爆炸(數組(40,80年))作為d_age;id的名字年齡地址c_aged_age- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -One hundred.約翰30.1130.40One hundred.約翰30.1130.80年One hundred.約翰30.116040One hundred.約翰30.116080年200年瑪麗1230.40200年瑪麗1230.80年200年瑪麗126040200年瑪麗126080年300年邁克80年3330.40300年邁克80年3330.80年300年邁克80年336040300年邁克80年336080年400年504430.40400年504430.80年400年50446040400年50446080年>選擇c_age,(1)橫向視圖爆炸(數組(30.,60))作為c_age橫向視圖爆炸(數組(40,80年))作為d_age集團通過c_age;c_age(1)- - - - - - - - - - - - - - - - - - -60830.8選擇*橫向視圖爆炸(數組())的表作為c_age;id的名字年齡地址c_age- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ->選擇*橫向視圖爆炸(數組())的表作為c_age;id的名字年齡地址c_age- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -One hundred.約翰30.11200年瑪麗12300年邁克80年33400年5044