SQL Coding Naming convention: Variable same name as Columns

by LakeFish84   Last Updated July 11, 2018 22:05 PM

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)

update dbo.Product
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;

Related Questions

Method naming: to vs as vs get

Updated April 25, 2018 02:05 AM

Naming Convention

Updated December 05, 2018 16:05 PM

Why do software use Win32 name?

Updated August 29, 2017 12:05 PM