我想在dashDB中創建一個重複的表格(有或沒有原始數據,它並不重要,表格結構是重要的)。 我想: SELECT * INTO new_table
FROM old_table;
,但我得到這個錯誤: "new_table" is not valid in the context where it is used.. SQLCODE=-206, SQLSTATE=42703, DRIVER=
我想在DB2版本11.1.0中使用CTAS語句,它創建一個新表並插入它。查詢如下: CREATE TABLE MY_SCRATCH.LC$U7OB81478732948714_zero_to_3 AS (
WITH two AS (SELECT id AS the_num FROM users WHERE id = 2)
, one_two AS (
SELECT
我很欣賞這有點奇怪,但我需要這樣做,因爲下一個數據報告步驟在這種特定格式的數據中繼。讓說我有一個表,如: ID | Type | Item
----------------------
1 | red | apple
2 | red | apple
3 | green | apple
4 | red | berry
5 | red | berry
6 | green | banana