81
p_Name varchar(100) not null,
p_Salary money not null,
constraint PK_POST primary key (id_Post)
)
go
/*==============================================================*/
/* Table: TimeSheet */
/*==============================================================*/
create table TimeSheet (
id_TimeSheet int not null,
id_Emp int null,
ts_Data datetime not null,
ts_StartTime datetime not null,
ts_StopTime datetime not null,
ts_Duration decimal(1,1) null,
constraint PK_TIMESHEET primary key (id_TimeSheet)
)
go
if exists(select 1 from sys.extended_properties p where
p.major_id = object_id('TimeSheet')
and p.minor_id = (select c.column_id from sys.columns c where c.object_id = p.major_id and
c.name = 'id_Emp')
)
begin
declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_dropextendedproperty 'MS_Description',
'user', @CurrentUser, 'table', 'TimeSheet', 'column', 'id_Emp'
end
select @CurrentUser = user_name()