Saturday, 28 September 2013

SQL command to Insert a range of years into a table

SQL command to Insert a range of years into a table

I am very new toSQL and am creating a basic database for a Car Dealership.
I have a table "Years" that I need to hold a range of years (1950 - 2014).
Instead of
INSERT INTO 'Years' ('year') ("1950");
INSERT INTO 'Years' ('year') ("1951");
INSERT INTO 'Years' ('year') ("1952");
etc, etc...
Is there an easier way to populate the table?

No comments:

Post a Comment