Skip to content

Primary key in SAS dataset #498

Answered by tomweber-sas
deboomce asked this question in Q&A
Discussion options

You must be logged in to vote

Hey, so SAS uses indexes, which are separate files that which are associated to the SAS Data Set. These can be created a number of ways, and they can also have various constraints, which can match what a primary key is. Indexes can be created a number of ways, either when a data set is created or after the fact. This can be done using various syntaxes, via data step or procs, like proc datasets and and proc sql (proc sql uses syntax like 'primary key'). There's a good set of info here in the sections labeled Indexes and Integrity Constraints. SAS decides to use the indexes based upon how the data set is being processed. For instance, when WHERE clauses are used, or By Group processing is …

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@deboomce
Comment options

@tomweber-sas
Comment options

Answer selected by deboomce
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants