查询:
access:
select top(10)*from table where 1=1;
mysql:
select *from table1 where 1=1 limit 10
sql server:
读取前十条:select top(10) * from table1 where 1=1;
读取后十条 :select top(10)* from table 1 order by id desc
oracle
select*from table1 where rownum <= 10;
db2 :
select column from table where 1=1 fetch first 10 rows only
插入:
insert:
删除:
delete table xx:delete table tb where条件
删除整个表的数据,不删除定义,不释放空间
turncate table xx;
作用:删除内容、释放空间但不删除定义,与drop不同,清空表数据,不删除表结构
drop table xx
删除内容和定义,释放空间,删除整个表。
本文详细介绍了在多种数据库系统中如何使用SQL语句进行高效的数据查询,包括Access、MySQL、SQL Server、Oracle和DB2等,涵盖了从读取数据、插入记录到删除表的全过程,是数据库操作的实用指南。
4万+

被折叠的 条评论
为什么被折叠?



