Guest User

Untitled

a guest
May 21st, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. create table AcCat(
  2. CatID smallint Primary Key,
  3. CatName nvarchar(20)
  4. )
  5.  
  6. Create Table Accounts(
  7. AcID int Primary key,
  8. AcNumber int,
  9. AcName nvarchar(20),
  10. AcCategory smallint references AcCat(CatID)
  11. )
  12.  
  13. Create Table Transactions(
  14. TrnRef bigint primary key identity (1,1),
  15. TrnDate datetime
  16. )
  17.  
  18. Create Table Voucher(
  19. VID bigint primary key identity (1,1),
  20. TranRef bigint references Transactions(TrnRef),
  21. AccountNo int references Accounts(AcID),
  22. DrCr nvarchar(2),
  23. Amount money,
  24. Narration nvarchar(100)
  25. )
  26.  
  27. Create Table Voucher_2(
  28. V2ID bigint primary key identity (1,1),
  29. V2TranRef bigint references Transactions(TrnRef),
  30. V2DebitAc int references Accounts(AcID),
  31. V2CreditAc int references Accounts(AcID),
  32. Amount money,
  33. Narration nvarchar(100)
  34. )
Add Comment
Please, Sign In to add comment