Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

FOR SQOOP WE NEED TABLES IN MYSQL AND DATA IN MYSQL

Create a Database
WCT

Create Tables
Employee:EmpId, FirstName, LastName, BirthDate, mailid, GenderCode, Address,
PhoneNumber
Projects:ProjectId,EmpId,ProjectName,Location,Startyear,Duration
Client: ClientId,ProjectId,Projectname,Location,PhoneNumber,DepartmentID
Department:DepartmentId,Deptname,ProjectId,EmployeeID,ScheduleID
HR:EmployeId,Startdate,DeptId,jobtitle,salary,Experience

Insert data into table with minimum 6 rows

1.create database databasename;


2.To list database
show databases;
3.Delete database
drop database dbname;
4.create table
first select database then create table in it
use dbname;
create table tablename(schema);

5.show tables;
6.Get structure of a table
describe tablename;
7.Add coloum to an already created table
alter table tblename add colname datatype;
8.Add coloum to a particular position
alter table tablename add colname datatype after colname;
9.How to insert data into a table
insert into tablename(colnames) values(values);
10.Add multiple rows at a time
insert into tablename(colnames) values(values),(values),(values);

You might also like