Why can I insert a number into a VARCHAR2 column?
<p>I have an odd problem with a table, I'm inserting rows into tables, and now I am trying to test it, on one of my tests it allows an entry that it shouldn't. </p>

<p>My table definition:</p>

<pre><code>CREATE TABLE ITEMS(
ITEM_NUMBER VARCHAR2(3)
CONSTRAINT ITEMS_ITEM_NUMBERf_PK PRIMARY KEY,
ITEM_DESCRIPTION VARCHAR2(30),
ITEM_SIZE VARCHAR2(2),
ITEM_COST NUMBER(30,0),
ITEM_QTY NUMBER(2,0),
ORDER_NUMBER VARCHAR2(4));
</code></pre>

<p>When I try and test the <code>ITEM_SIZE</code> column by putting in a <code>number</code> it just inserts it.</p>

<pre><code>INSERT INTO ITEMS VALUES ('I32', 'Leather blazer', 'L', 14.00, 1, 'O114');
INSERT INTO ITEMS VALUES ('I33', 'Fleece vest', 'L', 28.00, 1, 'O128');
INSERT INTO ITEMS VALUES ('I34', 'Khaki pants', 'S', 22.00, 3, 'O122');
INSERT INTO ITEMS VALUES ('I35', 'Muscle Tee', 'M', 12.99, 1, 'O122');
INSERT INTO ITEMS VALUES ('I36', 'Trench Coat', 'M', 03.00, 1, 'O133');
INSERT INTO ITEMS VALUES ('I37', 'Crewneck sweater', 'XL', 07.00, 1,   'O107');
INSERT INTO ITEMS VALUES ('I38', 'Varsity Sweater', 'M', 08.99, 1, 'O108');
INSERT INTO ITEMS VALUES ('I39', 'CROOK', 'M', 12.00, 1, 'O112');
</code></pre>

<p>//--the tester--// </p>

<pre><code>INSERT INTO ITEMS VALUES ('I49', 'bROOK', 10, 12.00, 1, 'O112');
</code></pre>

<p>In the statement above I insert the number 10 into <code>ITEM_SIZE VARCHAR2(2)</code>. How can I avoid that?</p>