Database common commands 1

1. Connect to the database mysql  -uroot 
 -p123456 /root-username 123456  -  password 5. View the content of the form  select*from jd; /jd-form name 6. View the form structure  desc jd; 7. Create a database  create databases xn; /xn- library name 8. Create a form  create table xv(id int, name char(10)); /xv-form name id-column name int-id column data type name-column name  9. Add a column to the form  alter table xv add(age int); /xv-table name age-column Name int-data type 10. Add data  insert into xv(name) values(cnds) for the form; /vx-indicate name-column name cnds-the content of the column 11. Delete the data in the form  delete from xv where name=" cnds"; /xv-indicates name-column name 12. Modify the data in the table































 












 update xv set name=“csdn” where id=1; /xv-indicate name-column name id-list

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326022585&siteId=291194637