Discussion Locked

creating tables with SQL

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

hello,
I've started learn ASP and making database driven web sites...I've gotten pretty proficient at it, but I want to start making tables dynamically using SQL.

I've found tons of resources on this, and SQL tutorials, but none of them tellme how to make the 2 data types that I need most (in this case).
-an autonumber field.
-a memo field

my questions are these:

1. what is the syntax to create a table that includes these data types.

2. are these data types proprietary to MSACCESS? (which would explain why I found no info on them)

thanks in advance,
Joel
jdm.4mg.com

2 replies

by pvp

Answering in reverse order:

No, they're not proprietary to MS Access. However, the handling of these datatypes varies with products. Sybase uses a numeric datatype with 0 decimal places and the IDENTITY property. MS SQL Server may do it similarly. Oracle does this badly, and not numerically--basically a kludey workaround.

"Memo" in most dBase-style databases is a separate file. In Sybase and MS SQL Server these BLOBs will be either text or binary datatypes.

Table creation also varies with the dmbs product. You didn't mention which one you're using, so...

by joel m

I'm using MS ACCESS...Still looking for the exact syntax on how to create these...I know it's something to the effect of this:
------------
CREATE TABLE table_name (name char(20), age integer)
---------------

but I need to know what's the syntax for the memo, and autonumber fields

This discussion is closed to new replies.