Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Unfamiliar SELECT Statement

$
0
0

Hello, all -

I'm reverse-engineering a stored procedure to clean it up, de-pasta-ize it and then excise as much as possible from the sp to use in an SSIS procedure.

While going over the sp, I've come across a SELECT statement variant that I've not seen before and I'm confused by it. Here it is;

SELECT TOP 1 AS alias.field
  FROM
    table AS alias
  WHERE
    etc., etc., etc.

I see that this query grabs the first row from the table given the WHERE conditions, but what confuses me is that there is no expression to place into alias.field.

I'm presuming that this is something simple, but I've never seen this syntax before and I don't see it as an option in the MSDN Library section on SELECT.

What, in general, would go into alias.field using this syntax?

Thanx!


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>