我想查看DB2數據庫查詢中的所有列,但是我想在前面放置某個列。如何在DB2查詢中選擇特定的字段和星號?
例如從我的SQL知識,我會然而上面的查詢返回錯誤象下面
SQL State: 42601
Vendor Code: -104
Message: [SQL0104] Token * was not valid. Valid tokens: (+ - ? : DAY INF NAN RID ROW RRN CASE CAST CHAR DATE DAYS HASH. Cause . . . . . : A syntax error was detected at token *.
Token * is not a valid token. A partial list of valid tokens is (+ - ? : DAY INF NAN RID ROW RRN CASE CAST CHAR DATE DAYS HASH.
This list assumes that the statement is correct up to the token.
The error may be earlier in the statement, but the syntax of the statement appears to be valid up to this point. Recovery . . . :
Do one or more of the following and try the request again: -- Verify the SQL statement in the area of the token *.
Correct the statement. The error could be a missing comma or quotation mark, it could be a misspelled word, or it could be related to the order of clauses.
-- If the error token is <END-OF-STATEMENT>, correct the SQL statement because it does not end with a valid clause.
Processing ended because the highlighted statement did not complete successfully
謝謝@mustaccio,這工作完美。 –