Database Reference
In-Depth Information
Syscolumns
Colname
Tbname
Coltype
Balance
Customer
DECIMAL(8,2)
City
Customer
CHAR(15)
141
City
Rep
CHAR(15)
Class
Part
CHAR(2)
Commission
Rep
DECIMAL(7,2)
CreditLimit
Customer
DECIMAL(8,2)
CustomerName
Customer
CHAR(35)
CustomerNum
Customer
CHAR(3)
CustomerNum
Orders
CHAR(3)
Description
Part
CHAR(15)
FirstName
Rep
CHAR(15)
LastName
Rep
CHAR(15)
NumOrdered
OrderLine
DECIMAL(3,0)
OnHand
Part
DECIMAL(4,0)
OrderDate
Orders
DATE
OrderNum
OrderLine
CHAR(5)
OrderNum
Orders
CHAR(5)
PartNum
OrderLine
CHAR(4)
PartNum
Part
CHAR(4)
Price
Part
DECIMAL(6,2)
QuotedPrice
OrderLine
DECIMAL(6,2)
Rate
Rep
DECIMAL(3,2)
RepNum
Customer
CHAR(2)
RepNum
Rep
CHAR(2)
State
Customer
CHAR(2)
State
Rep
CHAR(2)
Street
Customer
CHAR(15)
Street
Rep
CHAR(15)
Warehouse
Part
CHAR(2)
Zip
Customer
CHAR(5)
Zip
Rep
CHAR(5)
FIGURE 4-27
Syscolumns table
A DBMS furnishes ways of using the catalog to determine information about the structure of the data-
base. In some cases, this simply involves using SQL to query the tables in the catalog. For example, to list the
name and type of all fields (columns) in the Part table, you could use the following SQL command:
SELECT Colname, Coltype
FROM Syscolumns
WHERE Tbname= ' Part '
;
Search WWH ::




Custom Search