Reposted from: longtang Bay
1.1.1 obtain the first N records
SQL Server: Select Top N * From xtable
ORACLE: Select * From xtable where rownum
DB2: Select * From xtable fetch first n rows only
1.1.2 obtain the current date
SQL Server: Select getdate ()
1. Price
MySql: Cheap (partially free): currently, MySQL uses DualLicensed, a commercial license agreement developed by GPL and MySQLAB. If you use MySQL in a free (Open Source) project that complies with GPL, you can follow the GPL protocol to use MySQL for free. Otherwise, you need to purchase the commercial license agreement developed by MySQLAB. Windows $200, Unix or Linux installation free of charge,. Unix or Linux third-party installation $200.
Comparison of common functions for SQL Server to Oracle
1. Absolute ValueS: Select ABS (-1) ValueO: Select ABS (-1) value from dual
2. INTEGER (large)S: Select ceiling (-1.001) ValueO: Select Ceil (-1.001) value from dual
3. Round (small)S: Select floor (-1.001) ValueO: Select floor (-1.001) value from dual
4. Round (t
1. Price
MySql: Cheap (partially free): currently, MySQL uses DualLicensed, a commercial license agreement developed by GPL and MySQLAB. If you use MySQL in a free (Open Source) project that complies with GPL, you can follow the GPL protocol to use MySQL for free. Otherwise, you need to purchase the commercial license agreement developed by MySQLAB. Windows $200, Unix or Linux installation free of charge,. Unix or Linux third-party installation $200.
grant the table creation permission to the user girl under database mydb. note that users in different databases are different. assume that there is a user named girl under mydb. there is a user under testdb called girl. they all correspond to login boy. granting permissions to user girls under different databases does not affect other user girls.
So first log on to the database mydb. Then grant create table to girl; -- OK, and grant the user girl the permission.
how to create a session-level temporary table.Create global temporary table admin_work_area(Startdate DATE,Enddate DATE,Class CHAR (20 ))On commit preserve rows;EXAMPLE:
Session 1:SQL> drop table admin_work_area;SQL> CREATE GLOBAL TEMPORARY TABLE admin_work_area2 (startdate DATE,3 enddate DATE,4 class CHAR (20 ))5 on commit preserve rows;SQL> insert into permern
Transaction processing is a key issue for all large database products. database vendors have spent a lot of energy in this aspect, different transaction processing methods may cause huge differences in database performance and functions.
Transaction processing is also a problem that must be deeply understood by database administrators and database application developers. Negligence on this issue may lead to application logic errors and inefficiency.
Next we will discuss some of their differences
Document directory
Difference between Schema and user
Supplement
Schema in SQL Server
We know the database, as its name implies. the most important thing is data management, and data is stored in tables in the system. Therefore, almost all the mechanisms and operations in the database are centered around the table. the importance of tables can be imagined. how are tables stored in the database and ac
remote server, the files in the master database are generated in archive mode. In this mode, a small amount of data is allowed to be lost, because recovery can be executed on any point before a fault (no matter what kind of fault) occurs. It is similar in MSSQL, but three statuses need to be selected.SQL Server books online, like many other online resources, describes the differences between the three reco
TimeStandard Time for mst mdt Mountainous AreasNST standard time for new FinlandPst PDT Pacific Standard TimeYst ydt Yukon Standard Time
Character functions supported by Oracle and Their Microsoft SQL Server equivalent functions:
Functions: Oracle Microsoft SQL ServerConver
Comparison of common functions of SQL Server and Oracle, sqlserveroracle
--------- Mathematical functions1. Absolute ValueS: select abs (-1) valueO: select abs (-1) value from dual2. INTEGER (large)S: select ceiling (-1.001) valueO: select ceil (-1.001) value from dual3. Round (small)S: select floor (-1.001) valueO: se
Comparison of common SQL Server and Oracle Functions
Procedure Pro_SubPro(Dw_in in varchar2,Cur out pkg_general.ROW_CURSOR)AsBeginOpen curSelect yqmc from fle80 where dwbm = dw_in;End Pro_SubPro;Procedure Pro_MainPro (Dw_in in varchar2)AsMc NVARCHAR2 (20 );Cur pkg_general.ROW_CURSOR;BeginPro_SubPro (dw_in, cur );Fetch
It is very important to develop a database application and select a good database. This article compares three types of databases: SQL Server, Oracle, and DB2. It provides some reference for you to select a database.
Openness
SQL Server
It can only run on windows witho
LieHuo. Net database integrationOracle and Microsoft are both major database manufacturers, and there are also a lot of enterprises adopting the two products. This article compares Oracle and SQLServer images.
Database images are used to move database transactions from one database to another in different environments. An image copy is a backup copy and cannot be accessed directly. It is used only when an error is restored.
in the world, almost 85% of them use DB2 database servers, and about 5% in China to 97 years. Scalability and concurrency: SQL ServerThe parallel implementation and coexistence model are not mature. It is difficult to process the increasing number of users and data volumes. Limited scalability.OracleThe parallel server enables a group of nodes to share the work of the same cluster to expand the capabilitie
Comparison of common functions of SQL Server and Oracle
--------- Mathematical functions1. Absolute ValueS: select abs (-1) valueO: select abs (-1) value from dual2. INTEGER (large)S: select ceiling (-1.001) valueO: select ceil (-1.001) value from dual3. Round (small)S: select floor (-1.001) valueO: select floor (-1.00
(10) value 1
O: select log (10, 10) value from dual; 1
9. Square
S: select SQUARE (4) value 16
O: select power (4, 2) value from dual 16
10. Take the square root
S: select SQRT (4) value 2
O: select SQRT (4) value from dual 2
11. Evaluate the base power of any number
S: select power (3, 4) value 81
O: select power (3, 4) value from dual 81
12. Random Number acquisition
S: select rand () value
O: select sys. dbms_random.value (0, 1) value from dual;
13. Get the symbol
S: select sign (-8) value-1
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.