Advertisement
MdSadmanSiraj

ec2_mysql.txt

Jul 22nd, 2022 (edited)
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.44 KB | None | 0 0
  1. mysql -h project-db-instance.cp4pbzdfe7d6.us-west-1.rds.amazonaws.com -P 3306 -u admin -p
  2. SHOW DATABASES;
  3. CREATE DATABASE project;
  4. USE sample/project;
  5. SHOW TABLES;
  6. SELECT * FROM EMPLOYEES;
  7. \! clear
  8. ALTER TABLE `table_name` AUTO_INCREMENT = 1; // FOR empty TABLES
  9. ALTER TABLE `table_name` DROP `auto_colmn`;
  10. ALTER TABLE `table_name` ADD  `auto_colmn` INT( {many you want} ) NOT NULL AUTO_INCREMENT FIRST ,ADD PRIMARY KEY (`auto_colmn`);
  11.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement