Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
1.2 kB
1
Indexable
Never
mysql> create database travel;
Query OK, 1 row affected (9.79 sec)

mysql> use travel;
Database changed
mysql> create table details;
ERROR 1113 (42000): A table must have at least 1 column
mysql> create table details(CNO integer(3).CNAME varchar(30),TRAVELDATE varchar(10));
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.CNAME varchar(30),TRAVELDATE varchar(10))' at line 1
mysql> create table details(CNO integer(3),CNAME varchar(30),TRAVELDATE varchar(10));
Query OK, 0 rows affected, 1 warning (3.54 sec)

mysql> insert into detail values("106","ramesh jaya","2016-04-06");
ERROR 1146 (42S02): Table 'travel.detail' doesn't exist
mysql> insert into details values("106","ramesh jaya","2016-04-06");
Query OK, 1 row affected (0.25 sec)

mysql> insert into detail values("105","hitesh jain","2016-04-23");
ERROR 1146 (42S02): Table 'travel.detail' doesn't exist
mysql> insert into details values("105","hitesh jain","2016-04-23");
Query OK, 1 row affected (0.11 sec)

mysql> insert into details values("104","sahanubhuti","2016-01-28");
Query OK, 1 row affected (0.06 sec)

mysql> select * from details;