2016-07-11 3 views
1

이미 작성된 테이블에 행을 삽입하는 것에 대한 질문이 있습니다. 나는 테이블에 인쇄하는 경우테이블에 값을 입력하십시오.

mysql> describe llx_document_model ; 
+-------------+--------------+------+-----+---------+----------------+ 
| Field  | Type   | Null | Key | Default | Extra   | 
+-------------+--------------+------+-----+---------+----------------+ 
| rowid  | int(11)  | NO | PRI | NULL | auto_increment | 
| nom   | varchar(50) | YES | MUL | NULL |    | 
| entity  | int(11)  | NO |  | 1  |    | 
| type  | varchar(20) | NO |  | NULL |    | 
| libelle  | varchar(255) | YES |  | NULL |    | 
| description | text   | YES |  | NULL |    | 
+-------------+--------------+------+-----+---------+----------------+ 
6 rows in set (0.00 sec) 

:

내 테이블

mysql> select * from llx_document_model ; 
+-------+----------+--------+-------------------+---------+-------------+ 
| rowid | nom  | entity | type    | libelle | description | 
+-------+----------+--------+-------------------+---------+-------------+ 
|  1 | standard |  1 | deplacement  | NULL | NULL  | 
|  7 | soleil |  1 | ficheinter  | NULL | NULL  | 
| 13 | rouget |  1 | shipping   | NULL | NULL  | 
| 14 | typhon |  1 | delivery   | NULL | NULL  | 
| 16 | aurore |  1 | supplier_proposal | NULL | NULL  | 
| 17 | muscadet |  1 | order_supplier | NULL | NULL  | 
| 18 | baleine |  1 | project   | NULL | NULL  | 
| 19 | einstein |  1 | order    | NULL | NULL  | 
| 21 | azur  |  1 | propal   | NULL | NULL  | 
| 23 | strato |  1 | contract   | strato | NULL  | 
| 32 | crabe |  1 | invoice   | crabe | NULL  | 
+-------+----------+--------+-------------------+---------+-------------+ 
11 rows in set (0.00 sec) 

내가 행을 추가 할을, 그래서 쓰기 :

mysql> INSERT INTO llx_document_model 
    -> VALUES(NULL, moriba, 1, invoice, moriba, NULL); 

그러나 나는 얻을 이 오류 :

ERROR 1054 (42S22): Unknown column 'moriba' in 'field list' 

내 문제에 대해 알고 계십니까? 나는 실수 한 부분을 정말로 보지 못합니다.

미리 감사드립니다.

+1

랩'moriba','invoice', 작은 따옴표와'moriba'로 묶어야합니다. – Blank

+1

VALUES (NULL, 'moriba', 1, 'invoice', 'moriba', NULL); –

+2

문자열은 작은 따옴표 여야합니다. mysql> INSERT INTO llx_document_model VALUES (NULL, 'moriba', 1, invoice, moriba, NULL); – JYoThI

답변

1

문자열 (') 따옴표

mysql> INSERT INTO llx_document_model VALUES(NULL, 'moriba', 1, 'invoice', 'moriba', NULL); 
+0

고마워요! 그것은 어리석은 오류였다;) – Deadpool

관련 문제