ADBMS Lab MYSQL Database Queries Create Database Mysql>CREATE DATABASE sjcds; Show Database mysql> SHOW DATABASES; Use Database mysql> USE emplyeedb; Drop Database DROP DATABASE [IF EXISTS] database_name; Create Table mysql> CREATE TABLE employee_table( id int NOT NULL AUTO_INCREMENT, name varchar(50) NOT NULL, degree varchar(35) NOT NULL, age int NOT NULL, PRIMARY KEY (id) ); Show Tables mysql> SHOW TABLES; Alter table ALTER TABLE cus_tbl ADD mobile int(10) NOT NULL; Drop Table mysql> DROP TABLE orders; Truncate Table TRUNCATE TABLE table_name; Rename Table RENAME TABLE stu_table TO student_table; Insert Table CREATE TABLE People( id int NOT NULL AUTO_INCREMENT, name varchar(45) NOT NULL, occupation varchar(35) NOT NULL, age int, PRIMARY KEY (id) ); INSERT INTO People VALUES (102, 'Joseph', 'Developer', 30), (103, 'Mike', 'Leader', 28), (104, 'Step...
Comments
Post a Comment