0% found this document useful (0 votes)
11 views

Rishu dbms3.1

Uploaded by

Rishu Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Rishu dbms3.1

Uploaded by

Rishu Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
You are on page 1/ 2

mysql> create table emp(emp_ID int, emp_Name varchar(50),City varchar(50),Deptno int);

Query OK, 0 rows affected (1.04 sec)

mysql> DESC emp;


+----------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------+-------------+------+-----+---------+-------+
| emp_ID | int | YES | | NULL | |
| emp_Name | varchar(50) | YES | | NULL | |
| City | varchar(50) | YES | | NULL | |
| Deptno | int | YES | | NULL | |
+----------+-------------+------+-----+---------+-------+
4 rows in set (0.00 sec)

mysql> create table emp(emp_ID int, emp_Name varchar(50),City varchar(50),Post


varchar(50),Salary int,Deptno int);
ERROR 1050 (42S01): Table 'emp' already exists
mysql> selct * from info cross join info2;
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 'selct * from info cross join info2' at line
1
mysql> create table Emp(emp_ID int, emp_Name varchar(50),City varchar(50),Post
varchar(50),Salary int,Deptno int);
Query OK, 0 rows affected (1.40 sec)

mysql> insert into Emp values(1,"John","Nashik","clerk",5000,10);


Query OK, 1 row affected (0.17 sec)

mysql> insert into Emp values(2,"Seema","Aurangabad","Developer",20000,20);


Query OK, 1 row affected (0.18 sec)

mysql> insert into Emp values(3,"Amita","Pune","Manager",70000,20);


Query OK, 1 row affected (0.10 sec)

mysql> insert into Emp values(4,"Rakesh","Pune","Analys",8000,10);


Query OK, 1 row affected (0.18 sec)

mysql> insert into Emp values(5,"Tina","Nashik","Tester",20000,10);


Query OK, 1 row affected (0.09 sec)

mysql> insert into Emp values(6,"Anita","Pune","Developer",30000,30);


Query OK, 1 row affected (0.13 sec)

mysql> insert into Emp values(7,"Bhavika","Pune","Tester",50000,30);


Query OK, 1 row affected (0.10 sec)

mysql> insert into Emp values(8,"Deepa","Mumbai","Clerk",8000,30);


Query OK, 1 row affected (0.11 sec)

mysql> insert into Emp values(9,"Nitin","Nagpur","CEO",90000,10);


Query OK, 1 row affected (0.07 sec)
mysql> insert into Emp values(10,"Pooja","Pune","Analys",45000,20);
ERROR 2013 (HY000): Lost connection to MySQL server during query
No connection. Trying to reconnect...
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/var/run/mysqld/mysqld.sock' (2)
ERROR:
Can't connect to the server

mysql> insert into Emp values(10,"Pooja","Pune","Analys",45000,20);


No connection. Trying to reconnect...
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/var/run/mysqld/mysqld.sock' (2)
ERROR:
Can't connect to the server

mysql> insert into Emp values(10,"Pooja","Pune","Analys",45000,20);


No connection. Trying to reconnect...
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/var/run/mysqld/mysqld.sock' (2)
ERROR:
Can't connect to the server

mysql> insert into Emp values(10,"Pooja","Pune","Analys",45000,20);


No connection. Trying to reconnect...
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/var/run/mysqld/mysqld.sock' (2)
ERROR:
Can't connect to the server

mysql>

You might also like