1

Is the result of these two queries the same?

Select MIN(create_time) a, accounts FROM table1

... and ...

Select MIN(create_time) AS a, accounts FROM table1
Timothy Groote
  • 8,614
  • 26
  • 52
almoujtahed
  • 163
  • 11

1 Answers1

0

Yes, it is the same.

Also, if your alias is ever composed out of more words, then you should use it between double quotes.

Like this :

Select MIN(create_time) "MINIMUM TIME", accounts FROM table1

A I have said, this version is also equivalent:

Select MIN(create_time) AS "MINIMUM TIME", accounts FROM table1
Radu Gheorghiu
  • 20,049
  • 16
  • 72
  • 107
  • @almoujtahed You're welcome, I hope everything's clear. Don't forget upvoting and/or marking the correct answer everytime you ask a question. – Radu Gheorghiu Oct 29 '13 at 11:45
  • 1
    identifiers in SQL need to be enclosed in double quotes. Single quotes denote string literals. `'MINIMUM TIME'` is a string, `"MINIMUM TIME"` is an identifier (in this case a column alias) –  Oct 29 '13 at 12:42
  • @a_horse_with_no_name Thank you for the comment. I have modified my answer. – Radu Gheorghiu Oct 29 '13 at 13:39