查询前100条数据
#mysql select * from table_name limit 100 ; #sqlserver select top 100 * from table_name ;
从数据库.表 定位表
#mysql写法:库名.表名 select password from Info.users where userName=‘boss‘ #Sqlserver写法:库名.dbo.表名 ;或者:库名..表名 (注:中间使用两个点) select password from Info.dbo.users where userName=‘boss‘
获取时间
MySQL写法:now() SQLServer写法:getdate()
联结查询
# mysql & sqlserver select a.* , b.TypeName from Book as a left join BookType as b ON a.TypeId = b.TypeId
原文地址:https://www.cnblogs.com/xiaoliwang/p/9516904.html
时间: 2024-10-09 08:14:44