Querying the database via a url and displaying the results?
Direct answer to your question - you can get the parameter from the query string a number of ways:


use the arg() command (not recommended as best practice)
use the $_GET string, provided by PHP
use drupal_get_query_parameters


Any of these methods would get you the nid from the query string (in your example, 1) - you could then us db_query or node_load to load the data for this record and output it as desired but thats too much work. 

Much easier way to do this is to use the views module and add a contextual filter. Setup a basic view and then configure however you like (ex - display full node / teaser or views, etc). Set the path to 

record/%


where the percent sign indicates a variable you are going to pass to the contextual filter. Next, under advanced options


select 'contextual filters' and 'add'
search for and add one of type 'content: nid' 
on the next screen choose 'provide a default value' of type 'raw value from url', then select the url argument you want to use which in your case is '2'


Views will handle the querying for you and take care of sanitizing the input, and dealing with the output on the way.