Question: I can't insert a value using this code:

```
 insert into t_category_values (CategoryCode,
 CategoryValueCode, CategoryValue) values(2, 1, 1);

```

error msg

```
no primary key

```

Answer: 
Try this (**edited** because you use Sybase SQL Anywhere):

```
INSERT INTO dba.t_category_values
(CategoryCode, CategoryValueCode, CategoryValue)
VALUES(1, 1, 'aaa');

```

**EDITED:**  

from [Sybase web page](http://manuals.sybase.com/onlinebooks/group-pbarc/conn5/sqlug/@Generic__BookTextView/4620;pt=1435/%2a):
Adding rows to a table

Suppose that a new eastern sales department is created, with the same manager as the current Sales department. You can add this information to the database using the following INSERT statement:

```
 INSERT
 INTO department ( dept_id, dept_name, dept_head_id )
 VALUES ( 220, 'Eastern Sales', 902 )

```

If you make a mistake and forget to specify one of the columns, SQL Anywhere reports an error.

The NULL value is a special value used to indicate that something is either not known or not applicable. Some columns are allowed to contain the NULL value, and others are not.
You are getting the error "No Primary Key" because you have not specified a valid unique primary key. 

Your table must be 4 columns. 

```
INSERT INTO t_category_values (PRIMARY_KEY, CategoryCode, CategoryValueCode, CategoryValue) 
VALUES(pkey_value_here, 2, 1, 1);

```

The only time you dont need to specify the primary key column is when the primary key is an auto increment value. If it is an auto increment column the INSERT will automatically fill in that value for you and you dont need to worry about it.