数据库Oracle与SqlServer与Access
1,时间: Access:now() SqlServer:getdate() oracle:sysdate() 2,游标: sqlserver: declare @id int declare rs cursor for select PdaId from Biz_Pda where PdaState = ' 1 ' or PdaState = ' 2 ' if @iPda = 1 begin open rs fetch next from rs into @id
1,时间:Access:now()
SqlServer:getdate()
oracle:sysdate()
2,游标:
sqlserver:
declare @id int
declare rs cursor for select PdaId from Biz_Pda where PdaState='1' or PdaState='2'
if @iPda=1
begin
open rs
fetch next from rs
into @id
while @@fetch_status=0
begin
--执行的操作
end
close rs
deallocate rs
end
declare
r_cert certrecord%rowtype;
cursor cs is select * from certrecord order by id;
begin
open cs;
loop
fetch cs into r_cert;
exit when cs%notfound;--没有数据退出
--执行的操作
end loop;
commit;--提交数据
close cs;
end;
3,查询后赋给单个变量
sqlserver:
select @parameter=t.aa from table
select t.aa into parameter from table
4,函数:
字符转换:
sqlserver:str(..)
oracle:to_char(..)
access:cstr(..)
字符截取:([]为可选)
sqlserver:substring(s,start,length)
oracle:substr(s,start[,length])
access:Mid(s,start[,length])
注:sqlserver和oracle中start可从0或1开始,二者结果是一样的,access只能从1开始
5,case
在oracle,sqlserver都有case语句:
oracle:
Code
select c.userid,
a.unitcode,a.crid,a.isck,a.iszk,a.iszt,a.iszh,a.iswbz,
(case
when (select t.rylx from t_caijirecord t where t.crid=a.crid)=0 then 1
else 0
end) iscjk,
(case
when (select t.rylx from t_caijirecord t where t.crid=a.crid)=1 then 1
else 0
end) isczk,
c.idcardnum,c.receivetime
from certrecord c inner join
a_certrecord a on c.id = a.crid
SqlServer
SELECT
UserPassportID as PassportID,
UserID,
GrantorID,
Case ObjectTypeID
When 1 then ObjectID
End
as TerminalID,
Type, Flag, GrantDate, Validate, Invalidate
From UserPassport
Access:
Access
select OperationNo,iif(IsMadeFile=1,'sended',iif(IsMadeFile=0,'nosend')) as IsSend from T_OperationHistory
select OperationNo,switch(IsMadeFile=1,'sended',IsMadeFile=0,'nosend') as IsSend from T_OperationHistory

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











MySQL is suitable for web applications and content management systems and is popular for its open source, high performance and ease of use. 1) Compared with PostgreSQL, MySQL performs better in simple queries and high concurrent read operations. 2) Compared with Oracle, MySQL is more popular among small and medium-sized enterprises because of its open source and low cost. 3) Compared with Microsoft SQL Server, MySQL is more suitable for cross-platform applications. 4) Unlike MongoDB, MySQL is more suitable for structured data and transaction processing.

Oracle is not only a database company, but also a leader in cloud computing and ERP systems. 1. Oracle provides comprehensive solutions from database to cloud services and ERP systems. 2. OracleCloud challenges AWS and Azure, providing IaaS, PaaS and SaaS services. 3. Oracle's ERP systems such as E-BusinessSuite and FusionApplications help enterprises optimize operations.

Building a Hadoop Distributed File System (HDFS) on a CentOS system requires multiple steps. This article provides a brief configuration guide. 1. Prepare to install JDK in the early stage: Install JavaDevelopmentKit (JDK) on all nodes, and the version must be compatible with Hadoop. The installation package can be downloaded from the Oracle official website. Environment variable configuration: Edit /etc/profile file, set Java and Hadoop environment variables, so that the system can find the installation path of JDK and Hadoop. 2. Security configuration: SSH password-free login to generate SSH key: Use the ssh-keygen command on each node

MySQL efficiently manages structured data through table structure and SQL query, and implements inter-table relationships through foreign keys. 1. Define the data format and type when creating a table. 2. Use foreign keys to establish relationships between tables. 3. Improve performance through indexing and query optimization. 4. Regularly backup and monitor databases to ensure data security and performance optimization.

VprocesserazrabotkiveB-enclosed, Мнепришлостольностьсясзадачейтерациигооглапидляпапакробоглесхетсigootrive. LEAVALLYSUMBALLANCEFRIABLANCEFAUMDOPTOMATIFICATION, ČtookazaLovnetakProsto, Kakaožidal.Posenesko

MySQL is an open source relational database management system that is widely used in Web development. Its key features include: 1. Supports multiple storage engines, such as InnoDB and MyISAM, suitable for different scenarios; 2. Provides master-slave replication functions to facilitate load balancing and data backup; 3. Improve query efficiency through query optimization and index use.

MySQL is suitable for beginners because it is easy to use and powerful. 1.MySQL is a relational database, and uses SQL for CRUD operations. 2. It is simple to install and requires the root user password to be configured. 3. Use INSERT, UPDATE, DELETE, and SELECT to perform data operations. 4. ORDERBY, WHERE and JOIN can be used for complex queries. 5. Debugging requires checking the syntax and use EXPLAIN to analyze the query. 6. Optimization suggestions include using indexes, choosing the right data type and good programming habits.

I'm having a tough memory management problem while working on a Magento project. As the project involves a large amount of data processing, memory consumption increases rapidly, resulting in system performance degradation and even crashes. After some research, I discovered the zend-memory library, which effectively solved my memory management problem.
