JavaScript is required

Sử dụng từ khóa nào để đặt tên mới cho cột

A.
ALIAS
B.
AS
C.
NEW_COLUMM_NAME
D.
NEW_NAME
Trả lời:

Đáp án đúng: B


In SQL, the `AS` keyword is used to assign a new name (alias) to a column or table. This makes data queries easier to read and understand, especially when working with complex expressions or when you need to distinguish between columns with the same name. For example: `SELECT column_name AS new_column_name FROM table_name;` In this example, the `column_name` column will be displayed with the new name `new_column_name` in the query results. The other options are incorrect because `ALIAS` is not a standard SQL keyword for aliasing columns, and `NEW_COLUMN_NAME` and `NEW_NAME` are not keywords, but placeholders for the new name that you want to assign.

Câu hỏi liên quan