create table tbPosition(
-- Autoincrement Primary key
posid int primary key not null identity(1,1),
postitle varchar(200),
posdcs varchar(max)
);
--now we create tbstaff
create table tbStaff(
-- increment start from 100 and add 1
staffid int primary key not null identity(100,1),
staffname varchar(200),
gender char(1),
dob date,
merital varchar(200),
address1 varchar(max),
address2 varchar(max),
city varchar(200),
[state] varchar(200),
zipcode int,
email varchar(200),
posid int, -- now we create relationship on this
phone varchar(200),
photo varbinary(max),
active bit,
constraint fk_posid foreign key(posid)
references tbPosition(posid)
on delete cascade
on update cascade
);
Home
Posts filed under SQL
Showing posts with label SQL. Show all posts
Showing posts with label SQL. Show all posts
How To create table in sql server by query for relationship
Subscribe to:
Posts (Atom)
Sosial Media
Ads
Paling Dibaca
-
Manage your database in a whole new way. We've added improvements that help you accomplish more. Download
-
- Control Component - Change Keyboard Layout - Insert Update To MySql Server Download
-
Ultra MPEG-4 Converter is a professional file converter with which you can play any file. Discover the advantages offered by Ultra MPEG...
-
Capture your PC and Mac Capture an image or video of what you see on your computer screen. Record Skype calls or Google Hangouts with a...
-
Looking to install Windows 10 on your PC? To get started, you will first need to have a license to install Windows 10. You can the...
-
This source code support with Turbo C++ only --> Turbo C++ 32bit --> Turbo C++ 64bit Download
-
Internet Download Manager v6.26. Added Windows 10 compatibility. Fixed compatibility problems with different browsers including Interne...