Create Table with SQL command

M

mcdev

Hi, i'm a MS SQL Server user, not expert in using MS Access.

Does MS Access provide a kind of "SQL Text Editor" where i can use directly
sql command like "create table", "create index" ecc. instead using Access
table design tools? If so, where is it?

Thanks in advance.

Br
 
R

RoyVidar

mcdev said:
Hi, i'm a MS SQL Server user, not expert in using MS Access.

Does MS Access provide a kind of "SQL Text Editor" where i can use
directly sql command like "create table", "create index" ecc. instead
using Access table design tools? If so, where is it?

Thanks in advance.

Br

Yes, kind of, but probably with some (lot?) of difference to what
you're used to.

In the query tab, click create query in design view, then you can
switch view to SQL view through the view menu or a view button
to the left on the toolbar.

But - some/lot of the "more interessting" DDL, such as check
constratints, default values etc, is usually not supported within
the interface

You'd need to either

1 - execute the DDL through ADO (i e in VBA code) or

2 - switch the ANSI SQL mode to ANSI 92 (somewhere in Tools |
Options), which will make it possible to ouse the query tool for
this.

In both cases, you might want a peek at for instance
http://msdn.microsoft.com/en-us/library/aa140011.aspx and
http://msdn.microsoft.com/en-us/library/aa140015(office.10).aspx

(there you'll find lot of DDL that is availabe through the interface,
and lot that is dependent on either ANSI SQL 92 or ADO)

If you use some of the DDL features not available through the
interface, then you need DDL to remove and/or alter them too.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top