Help: How to reference variables in the Query Analyzer of SQL Server

xiaoxiao2021-03-06  94

For example, there is a Monitor table in the Master database of the query analyzer.

I want to use a variable to get the table name, and then use this variable in the SELECT query statement. What should I do?

Declare @B VARCHAR (30)

SELECT @ b = 'Monitor'

Select * from @B The last sentence is to get the content of this table, but it is not, which prawn helps!

转载请注明原文地址:https://www.9cbs.com/read-96294.html

New Post(0)