Machine-translated by Google. Questions are authored in English.
Top

Discussion

Which keyword is used to rename a field name in SQL query ?

  • A.AS
  • B.ALTER
  • C.LIKE
  • D.FROM

Answer: B

The keyword is AS.

AS gives a column (or table) an alias in the result of a query, for example SELECT name AS employee_name FROM employee; displays the column under the new heading without changing the table.

ALTER changes the structure of a table (and with RENAME COLUMN can rename a column permanently, but that is a schema change, not part of a query). LIKE is for pattern matching in conditions, and FROM names the tables a query reads.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.