TABLE NAME AS A VARIABLE IN SQL

  • Thread starter Thread starter Gina L. Hernandez
  • Start date Start date
G

Gina L. Hernandez

Could somebody tell me what is the syntax for reading the name of a tabla
from a variable??. For example



declare @tabla varchar(10)

set @tabla = 'prompts'

select *
from @tabla

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top