Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- In the example below, testdb is the name of the database, testuser is the user, and password is the user’s password.
- create database testdb;
- create user 'testuser'@'localhost' identified by 'password';
- grant all on testdb.* to 'testuser';
- CREATE TABLE Crossgate (INCIDENT INT, NAME VARCHAR(20) NOT NULL, EMAIL VARCHAR(20) NOT NULL);
- SHOW TABLES;
- INSERT INTO Crossgate (INCIDENT,NAME,EMAIL) VALUES(1020,"Bipul kumar","sir.isac@gmail.com");INSERT INTO Crossgate (INCIDENT,NAME,EMAIL) VALUES(1021,"Atul kumar","Atul@gmail.com");
- INSERT INTO Crossgate (INCIDENT,NAME,EMAIL) VALUES(1022,"Anuradha ","Anuradha@gmail.com");
- Query OK, 1 row affected (0.06 sec)
- SELECT * FROM Crossgate;
- When you wants to insert .csv file into table use
- mysql --local-infile=1 -u username -p
- LOAD DATA LOCAL INFILE '/home/bipul/testlist.csv' INTO TABLE Crossgate;
- Deleting all table details
- delete from tableName.
Add Comment
Please, Sign In to add comment