Creating a Table using SQL Commands in Access 2010

13. May 2012

Access 2010 Tips and Tricks from IT Brigade Inc.

 

Problem: So how do you create a table in Access 2010 using SQL commands? (I get a lot of Google searches on this).

Solution: It’s really easy, especially if you are familiar with T-SQL. 

 

1. Get into SQL View in Access 2010

First see my post for getting the SQL view visible in Access 2010.

 

2. Use T-SQL command, SQL CREATE TABLE, to create the Table

Next once you in are in SQL view, simply use the T-SQL command: SQL CREATE TABLE.

For example to create the Person table:

CREATE TABLE Person
(
PersonID int PRIMARY KEY,
FirstName varchar(75),
LastName varchar(75),
Address1 varchar(100),
Address2 varchar(100),
City varchar(50),
State varchar(50),
ZipCode int,
BirthDate date)

}

Now run Query.

Here’s the resulting table

And here’s the table in Design View

 

That’s it – easy!

 

 

  By John Dorsey  IT Brigade Inc.           

Access ,