32. MS SQL Server 2022| Pro T-SQL in Pashto| ( Alter table and add Column/Field and Constraints)

Опубликовано: 23 Март 2026
на канале: Yousufzai SkillTech
120
9

TSQL Code:
use testdb;
go

if exists(select* from sys.tables where name='employee')
drop table employee
go

create table employee (
id int,
ename varchar(50)
);

select * from sys.tables

alter table employee
add constraint pk_id primary key(id)

alter table employee
alter column id int not null

alter table employee
add age int not null

select * from employee