2
Hello, my question is this::
I have a Select in Sqlserver of two tables with Inner Join, they return me a set of 5 columns. I would like to know how to list the type of these columns.
I know you have a way of showing the speaker type with SP_Columns
, but it only shows me if the parameter passed is a table or view.
My select is this:
SELECT *
FROM Produtos p
INNER JOIN Marca m
ON p.prodcodigo=m.prodcodigo
When you do a query or cursor to retrieve values in SQL Server, you need to define the types of variables that will receive these values. In pure T-SQL I do not think it is possible to do this unless, perhaps, with an immense gambiarra of dynamic queries generation. On the other hand, if you are accessing the database with a programming language it would be possible to access the query meta-data.
– utluiz