Skip to main content

InvoiceLine

Description

Table Definition
CREATE TABLE [InvoiceLine]
(
[InvoiceLineId] INTEGER NOT NULL,
[InvoiceId] INTEGER NOT NULL,
[TrackId] INTEGER NOT NULL,
[UnitPrice] NUMERIC(10,2) NOT NULL,
[Quantity] INTEGER NOT NULL,
CONSTRAINT [PK_InvoiceLine] PRIMARY KEY ([InvoiceLineId]),
FOREIGN KEY ([InvoiceId]) REFERENCES [Invoice] ([InvoiceId])
ON DELETE NO ACTION ON UPDATE NO ACTION,
FOREIGN KEY ([TrackId]) REFERENCES [Track] ([TrackId])
ON DELETE NO ACTION ON UPDATE NO ACTION
)

Columns

NameTypeDefaultNullableChildrenParentsComment
InvoiceLineIdINTEGERfalse
InvoiceIdINTEGERfalseInvoice
TrackIdINTEGERfalseTrack
UnitPriceNUMERIC(10,2)false
QuantityINTEGERfalse

Constraints

NameTypeDefinition
InvoiceLineIdPRIMARY KEYPRIMARY KEY (InvoiceLineId)
- (Foreign key ID: 0)FOREIGN KEYFOREIGN KEY (TrackId) REFERENCES Track (TrackId) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE
- (Foreign key ID: 1)FOREIGN KEYFOREIGN KEY (InvoiceId) REFERENCES Invoice (InvoiceId) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE

Indexes

NameDefinition
IFK_InvoiceLineTrackIdCREATE INDEX [IFK_InvoiceLineTrackId] ON [InvoiceLine] ([TrackId])
IFK_InvoiceLineInvoiceIdCREATE INDEX [IFK_InvoiceLineInvoiceId] ON [InvoiceLine] ([InvoiceId])

Relations

er