By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,766 Members | 1,290 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,766 IT Pros & Developers. It's quick & easy.

Quick question

P: 1

I have a quick question. I'm studying how XML works in sq server 2005, and I've hit the following code online that I can't completely understand (see below code).
I know what it does, how it works, but it's just the part "AS feed (xmlData)" that I'm trying to fully understand. I get the 'As feed' is an alias,but why must the (xmlData) be there?
If anyone can answer this (i'm asuuming simple question!) I would greatly appreciate it.


INSERT INTO rssFeeds (feedName, feedXML)
(BULK 'C:\Temp\rss.xml', SINGLE_CLOB)
AS xmlData
) AS feed (xmlData)
Sep 11 '09 #1
Share this Question
Share on Google+
1 Reply

Expert 2.5K+
P: 2,878
It's a column alias. As you can see, the outer SELECT used xmlData. That xmlData is the same xmlData used in the alias. Read the FROM part of the select here.

Happy Coding!!!

--- CK
Sep 12 '09 #2

Post your reply

Sign in to post your reply or Sign up for a free account.