1、INSERT INTO `user` (`name`, `sex`, `age`, `email`, `password`,`static` ,`create_time`)VALUES ('老顽童', '0', '78', 'lwt@php.cn', sha1('123456'), '1', '1543837899'); 2、INSERT `user` values(null,'洪七公',0,67,'hq@php.cn',sha(123456),1 ,'1543837899'); 3、INSERT user VALUE(null,'杨康',0,26,'yk@php.cn',sha(123456),1 ,'1543837899'), (null,'欧阳克',0,26,'oyk@php.cn',sha(123456),1 ,'1543837899'); 4、UPDATE `user` SET `age`= 36 WHERE `id`= 4; 5、UPDATE `user` SET `age`= 56,`static`=0 WHERE `id`= 4; 6、SELECT * FROM `user`; 7、SELECT `name`,`sex`,`age`,`email` FROM `user`; 8、SELECT `name`,`sex`,`age`,`email`,`static` FROM `user` WHERE `static`=1 ORDER BY `age` LIMIT 2; 9、SELECT 15*20 AS RESULT; 10、SELECT concat(`id`,`name`) AS `USER_INFO` FROM `user` WHERE `static`=1; 11、SELECT concat_ws(':',`id`,`name`) AS `USER_INFO` FROM `user` WHERE `static`=1; 12、SELECT COUNT(*) AS RES FROM `user` WHERE `static`=1; 13、DELETE FROM `user` WHERE `id`=5; 14、TRUNCATE TABLE `user`; 15、ALTER TABLE `user` DROP `id`; 16、ALTER TABLE `user` ADD 'id' int(5) PRIMARY KEY NOT NULL AUTO_INCREMENT FIRST
MySQL语法