基础SQL语句

php中文网
发布: 2016-06-07 17:40:48
原创
1380人浏览过

增:insert into T_1(Name,Age) values (李小争23); Values 中顺序要和表名中的顺序一致 查:select Name,Id from T1; Select * from T1;//查询出所有字段 select * from T_Student where Age30 删:delete from T_Student where 从T_Student中删除Name

增:insert into  t_1(name,age) values (’李小争’23);

Values 中顺序要和表名中的顺序一致

 

Ztoy网络商铺多用户版
Ztoy网络商铺多用户版

在原版的基础上做了一下修正:增加1st在线支付功能与论坛用户数据结合,vip也可与论坛相关,增加互动性vip会员的全面修正评论没有提交正文的问题特价商品的调用连接问题删掉了2个木马文件去掉了一个后门补了SQL注入补了一个过滤漏洞浮动价不能删除的问题不能够搜索问题收藏时放入购物车时出错点放入购物车弹出2个窗口修正定单不能删除问题VIP出错问题主题添加问题商家注册页导航连接问题添加了导航FLASH源文

Ztoy网络商铺多用户版 0
查看详情 Ztoy网络商铺多用户版

查:select Name,Id from T1;

Select * from T1;//查询出所有字段

select * from T_Student where Age

 

删:delete from T_Student where

从T_Student中删除Name字段等于lxz的数据

Delete from T_Student

删除T_Student中的所有数据

 

Delete from T_Student where Age>100 or Name=’lxz’   或者

Delete from T_Student where Age>100 and Height>150   并且

 

 

更新:update T_Student set Age=Age+1

 

update T_Student set Height=180

 

update T_Student set Love='散步' where Age>100

 

select Name as 姓名, Age as 年龄 from T_Student

select MAX(age) from T_Student  查询最大年龄

select MAX(age),MIN(age) from T_Student

 

select MAX(age) as 最大年龄,MIN(age) as 最小年龄,AVG(age) as 平均年龄 from T_Student

select MAX(age) as 最大年龄,MIN(age) as 最小年龄,AVG(age) as 平均年龄,COUNT(*) as 总行数  from T_Student

 

select * from T_Student where Name like 'y%'

查询以y开头后面有若干个字符。。。

 

select * from T_Student where Name like '%a%'

查询含有a

 

 

select * from T_Student order by Age    按照年龄升序排列

select * from T_Student order by Age Desc  按照年龄升序排列

 

select * from T_Student where Name like 'y%' order by Age 

 

,免备案空间,香港虚拟主机,香港服务器租用
最佳 Windows 性能的顶级免费优化软件
最佳 Windows 性能的顶级免费优化软件

每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。

下载
来源:php中文网
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
开源免费商场系统广告
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号