Declare @ColumnName Varchar(20)
Declare @ConstraintName varchar(100)

Select @ColumnName = column_name, @ConstraintName = CONSTRAINT_NAME 
FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE
WHERE OBJECTPROPERTY(OBJECT_ID(constraint_name), 'IsPrimaryKey') = 1
AND table_name = 'Notebimeh'

IF UPPER(@ColumnName) = 'SAZMAN_CODE'    
Begin
Exec ('ALTER TABLE [dbo].[Notebimeh] DROP CONSTRAINT ' + @ConstraintName)
Alter Table Notebimeh Alter Column Note_code Varchar(20) Not Null
Alter Table Dbo.Notebimeh Add Constraint Pk_Notebimeh Primary Key (Sazman_Code, Note_code)    
End