编程开发:常用SQL语句 | 少将全栈
  • 欢迎访问少将全栈,学会感恩,乐于付出,珍惜缘份,成就彼此、推荐使用最新版火狐浏览器和Chrome浏览器访问本网站。
  • 吐槽,投稿,删稿,交个朋友
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏少将全栈吧

编程开发:常用SQL语句

点滴 admin 13年前 (2011-08-20) 1659次浏览 已收录 扫描二维码

Insert Into T_Person(FName,FAge) values(’Jim’,25)
Select * from T_Person

CREATE TABLE `xsglxt`.`t_person` (
`FName` VARCHAR( 256 ) NOT NULL ,
`FAge` VARCHAR( 256 ) NOT NULL
) ENGINE = MYISAM

Update
Insert
Delete

Update
select * from T_Person
Updata T_Person Set FAge=30
update T_Person Set FAge=20 where FName=’Tom’

Delete From T_Person
是删除T_Person里的数据
但是表还在

Insert into test(FNumber,FName,FAge,FSalary) Values(’0002’,’Lily’,19,4300)
select * from test where FSalary>3000
select * from test where FName like ’%m%’
select * from test where FName like ’%m%’ or FName like ’%i%’
select *from test where FSalary<3000 and FSalary>2500
select * from test where FSalary between 2000 and 3000
select SUM(FSalary) from test
select AVG(FSalary) from test
select MAX(FSalary) from test
select MIN(FSalary) from test
select SUM(FSalary),AVG(FSALARY),MAX(FSALARY),MIN(FSalary) from test
select COUNT(*),SUM(FSalary),AVG(FSALARY),MAX(FSALARY),MIN(FSalary) from test
select COUNT(*) from test where FSalary>3000
select COUNT(*),SUM(FSalary),AVG(FSALARY),MAX(FSALARY),MIN(FSalary) from test where FSalary<3000
select * from test order by FSalary asc

喜欢 (0)
[🍬谢谢你请我吃糖果🍬🍬~]
分享 (0)
关于作者:
少将,关注Web全栈开发、项目管理,持续不断的学习、努力成为一个更棒的开发,做最好的自己,让世界因你不同。