Goal
Goal

Reputation: 87

Parameter kind of "%Type" in SQL Server

So I was using Oracle before and when I want to create a parameter that has the same datatype as the datatype of an attribute in the table for a stored procedure or a function, I can use like

Create or replace procedure procedure__name(p_parameter Table.Attribute%TYPE)

I wonder if we have any kind of copy datatype like this in SQL Server also? (I did try Create procedure (@p_parameter Table.Attribute%TYPE) but of course it doesn't work). Or I have to specify the datatype for each of my parameter?

Upvotes: 0

Views: 93

Answers (1)

Joel Coehoorn
Joel Coehoorn

Reputation: 415840

No, this is not in SQL Server. It's not part of standard ANSI SQL.

Upvotes: 1

Related Questions