create table furniture
(
no int(6) NOT NULL PRIMARY KEY, itemname varchar(20) default NULL, type varchar(10) default NULL, dateofstock date default NULL, price decimal(6,0), discount int(2)
);
Query OK, 0 rows affected (0.22 sec)
This query will create a table
create table arrival
(
no int(6) NOT NULL PRIMARY KEY, itemname varchar(20) default NULL, type varchar(20) default NULL, dateofstock date default NULL, price int(6) default NULL, discount int(2)
);
Query OK, 0 rows affected (0.22 sec)
mysql> desc furniture;
+-------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+--------------+------+-----+---------+-------+
| no | int(6) | NO | PRI | NULL | |
| itemname | varchar(20) | YES | | NULL | |
| type | varchar(10) | YES | | NULL | |
| dateofstock | date | YES | | NULL | |
| price | decimal(6,0) | YES | | NULL | |
| discount | int(2) | YES | | NULL | |
+-------------+--------------+------+-----+---------+-------+
6 rows in set (0.00 sec)
inserting values into the table furniture and arrival
insert into furniture values(1,"white lotus","double Bed","2002/02/23",30000,25);
insert into furniture values(2,"Pink Feather","Baby cot","2002/01/20",7000,20);
insert into furniture values(3,"Dolphine","Baby cot","2002/02/19",9500,20);
insert into furniture values(4,"Decent","Office Table","2002/01/01",25000,30);
insert into furniture values(5,"Comfort Zone","Double Bed","2002/01/12",25000,25);
insert into furniture values(6,"Donald","Baby cot","2002/01/12",6500,15);
insert into furniture values(7,"Royal Finish","office Table","2002/10/20",18000,25);
insert into furniture values(8,"Royal Tiger","Sofa","2002/03/22",31000,25);
insert into furniture