Mysq_知识总结05(对表的格式、内容的更改)

USE jdbc_01;//自己建立的数据库
SHOW TABLES;
SELECT *FROM student;
DESC student;
ALTER TABLE student ADD address VARCHAR(20);
UPDATE student SET address = '陕西延安'  ;
UPDATE student SET address = '陕西宝鸡' WHERE id = 4;
ALTER TABLE student CHANGE COLUMN age gender VARCHAR(2);
INSERT INTO student(NAME,gender,addess) VALUES('代','男','陕西延安');
UPDATE student SET gender = '女' WHERE id = 4;
DELETE FROM student WHERE id = 6;
INSERT INTO student(NAME)VALUES('daihu')
CREATE TABLE user_list (
    id INT PRIMARY KEY AUTO_INCREMENT,
    NAME VARCHAR(20) NOT NULL,
    PASSWORD VARCHAR(20)  NOT NULL);
DELIMITER $
CREATE PROCEDURE testIn(IN n INT)
BEGIN
    SELECT * FROM student WHERE id = n;jdbc_01
END $
DELIMITER $
CREATE PROCEDURE testOut(OUT n VARCHAR(20))
BEGIN
    SET n = '大家好,这是什么歌';
END $
SELECT COUNT(*) FROM student;
CREATE TABLE news (
    id INT,
    NAME VARCHAR(20),
    address VARCHAR(20)
    );
SELECT *FROM news;
CREATE TABLE daihu (
    title VARCHAR(20),
    content VARCHAR(20)
    );
SELECT * FROM daihu;
全部评论

相关推荐

10-07 20:48
门头沟学院 Java
不敢追175女神:可能是实习上着班想到后面还要回学校给导师做牛马,看着身边都是21-25的年纪,突然emo了了
点赞 评论 收藏
分享
评论
点赞
收藏
分享
牛客网
牛客企业服务