Hello,
I have used Access for a number of years but now I'm taking a class on database programming which is teaching SQL as part of the course. I'm trying to learn how to create a table with SQL statements in the query design window. The book that I'm using just gives the default SQL statement for using SQL but it isn't specific to Access. If I use the statements that the book is using I get an syntax error. I will type the code below and hopefully someone can tell me what I'm doing wrong. I desperately need help.
Here is the code:
CREATE TABLE OrderItems
(
order_num INTEGER NOT NULL,
order_item INTEGER NOT NULL,
prod_id CHAR(10) NOT NULL,
quantity INTEGER NOT NULL DEFAULT 1,
item_price DECIMAL(8.2) NOT NULL
);
The line that is bolded is the one I'm having trouble with. I keep getting a syntax error. What is the matter? Also, what value should I specify for the second to the last line of code that specifies that the item price is a decimal? Decimal doesn't seem to be a recognized code in value in access.
Thanks for any help someone can give me.
Joel Wiggers