Is there a coding naming convention principal for SQL variables? Can variables be named the same as column names, I heard in different companies, this may cause confusion. However in C# below, its a generally accepted principle, resource below.
create table dbo.Product
(
ProductId int primary key null,
ProductName varchar(25) not null,
ProductDescription varchar(255) not null
)
create procedure dbo.ProductNameUpdate
@ProductId int, @ProductName varchar(255)
as
update dbo.Product
set
ProductName = @ProductName
where ProductId = @ProductId
https://msdn.microsoft.com/en-us/library/ms229060(v=vs.100).aspx https://www.dotnetperls.com/constructor
public Product(int ProductId, int ProductName)
{
this.ProductId= ProductId;
this.ProductName= ProductName;
}
this
keyword. – Robert Harvey Jul 12 '18 at 0:28