Solved

Help me decipher this SQL query

Posted on 2010-11-30
1
247 Views
Last Modified: 2012-05-10
Select name into ##TestFields from syscolumns where Id = object_id('" + @tablename + "') and xtype in (167,231)
0
Comment
Question by:spirose
1 Comment
 
LVL 6

Accepted Solution

by:
hyphenpipe earned 50 total points
ID: 34242419
It appears to be part of a stored procedure where you supply the name of a table (@tablename) and it will insert into a global temporary table, hence the ##, the name of every varchar (167) and nvarchar(231) column in that table.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question