Skip to main content

Circuits

[dbo.circuits]

Column nameKeyData typeAllow NULLsDefaultDescription
circuitIdPrimary KeyINT
circuitRefVARCHAR(255)Unique circuit identifier
nameVARCHAR(255)Circuit name
altINTAltitude (metres)
urlVARCHAR(255)Circuit Wikipedia page
locationIDINTForeign key links to locations
countryIDINTForeign Key link to countries
circuitDirectionIDINTForeign key link to circuitDirection
circuitTypeIDINTForeign key link to circuitType

Table Relationships

Circuits

Where Used

Where is this table referenced and what columns are used? The below table shows that information.

[dbo.circuits]

Parent_schemaNameParent_tableNameParent_columnNameSchematablecolumnconstraint_name
dbocircuitscircuitIddbocircuitMapcircuitIdFK_circuitMap_circuitId
dbocircuitscircuitIddboracescircuitIdFK_Races_CircuitID

Example Query

SELECT 
[circuitId]
,[circuitRef]
,[name]
,[location]
,[country]
,[alt]
,[url]
FROM
[dbo].[circuits]
WHERE
circuitRef ='spa'
AND active = 1

Example Output

circuitIdcircuitRefnamealturllocationIDcountryIDcircuitDirectionIDcircuitTypeID
1albert_parkAlbert Park Grand Prix Circuit10http://en.wikipedia.org/wiki/Melbourne_Grand_Prix_Circuit40211
2sepangSepang International Circuit18http://en.wikipedia.org/wiki/Sepang_International_Circuit311712