Comments are available to members only. Sign up or Log in to view these comments.
Main Topics
Browse All TopicsDear experts
I am using Db2-ExpressC
In the db2 command editor i am trying to create a table and insert records in that table.
I have done that in oracle but am new to db2. this is my table structure
create table entity_sample(productId varchar(64), name varchar(64),productPx numeric(18), description varchar(64))
(the above create command doesnt seem to work)
this is the error i get:
>>>>>>>>>>>>>>
--------------------------
create table entity_sample(productId varchar(64), name varchar(64),productPx numeric(18), description varchar(64));
--------------------------
create table entity_sample(productId varchar(64), name varchar(64),productPx numeric(18), description varchar(64))
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL1024N A database connection does not exist. SQLSTATE=08003
SQL1024N A database connection does not exist.
Explanation:
There is no connection to a database. Other SQL statements
cannot be processed unless an SQL CONNECT was previously
executed.
The command cannot be processed.
User Response:
If the error occurred when disconnecting from the database,
continue processing. If the error occurred on another SQL
statement, issue an SQL CONNECT statement and resubmit the
command or statement.
sqlcode : -1024
sqlstate : 08003
>>>>>>>>>>>>>>
can anyone please tell me whats going wrong.
2.
also , if i wanted to insert data in the above table like
productId :123
Name : apples
productPx : 15
description : My first product
what would the statement be?
3.
How do i set the "productId" as primary key. Can i do it in the command editor itself?
thanks
J
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: momi_sabagPosted on 2006-12-25 at 23:54:37ID: 18197458
Comments are available to members only. Sign up or Log in to view these comments.