C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !



Posted By: lakshmipathy       Member Level: Bronze       Posted Date: 30 Aug 2005       Category: SQL Server

DECLARE @val CHAR(50)
SET @val = 'use Pubs select * from jobs '
exec @val

Why does this query does not work??



Select Answer:

string Use Pubs and select * from jobs should be concatenated with &
@val variable should have only one statement to execute
strings can not have queries
exec(@val) can be given




      
Your Test Score: 0 / 0



Next Question: 'select * from tablename for xml auto' What does the above query retrieve?
Previous Question: How can one change the database owner?
Related Questions:
  • Which of the following options is not correct about the DATEDIFF() function?


  • Upto how many level of Subquery nesting is possible in SQL Server?


  • Function returning the list of collation in SQL server


  • Replication


  • Which system table contains information on constraints on all the tables created


  • Categories

    ASP.NET C# VB.NET 
    .NET Framework SQL Server Other 

    Submit Interview/Test Questions with Answers and make money from adsense revenue sharing program

    Want to prepare for an interview? Try our aptitude tests and standard interview questions first.


    dotNet Slackers   BizTalk Adaptors    Web Design


    Contact Us    Privacy Policy    Terms Of Use