Professional Documents
Culture Documents
Difference (Oracle and Mysql)
Difference (Oracle and Mysql)
===========================================================================
Character MySQL support only two characters that are CHAR and VARCHAR. Oracle
supports four different characters that are CHAR, VARCHAR2, NCHAR, and NVARCHAR2.
==========================================================================
========================================
Current date
==========================================================
MySQL
show tables;
================================================
Types of Joins
MySQl :- inner, equi, outer, cross, self
The below table contains differences of the most popular string functions between SQL Server,
Oracle and MySQL.
Descriptio
Function SQL Server Oracle MySQL
n
ASCII code
ASCII(string_expressi of a
yes yes yes
on) leftmost
character.
Character yes and additionally
CHR(integer_express
from int yes yes supports more than
ion)
ASCII code. one character
Starting
CHARINDEX(find_e
INSTR(string, position of
xpr, search_expr, yes yes
substring) a string in a
start_pos)
string.
Concatenat yes but only two
CONCAT(str_expr1, es string string
yes yes
str_expr2, ...) expressions expressions are
into one. allowed
Formats a
partially,
FORMAT(value, numeric or TO_CHAR(valu
yes FORMAT(value,
format) date time e, format)
decimal_digits)
value.
SUBSTR(str_ex
LEFT(str_expr, Left part of
yes pr, 1, yes
num_of_chars) str_expr.
num_of_chars)
Number of yes (LEN vs LENGTH(str_ex CHAR_LENGTH(str_e
LEN(str_expr)
characters. DATALENGTH) pr) xpr)
Lowercase
LOWER(str_expr) version of yes yes yes
string.
no, but can be
Pads left
LPAD(str_expr, achieved by mixing
side of yes yes
length, pad) REPLICATE,
str_expr.
concatenation, LEN
Removes
LTRIM(str_expr) leading yes yes, extended yes
blanks.
Replaces
REPLACE(str_expr, all
yes yes yes
pattern, replacement) occurrence
s of pattern
no, but can be
Pads right
RPAD(str_expr, achieved by mixing
side of yes yes
length, pad) REPLICATE,
str_expr.
concatenation, LEN
Reverse
REVERSE(str_expr) ordering of yes yes yes
characters.
SUBSTR(str_ex
RIGHT(str_expr, Right part
yes pr, - yes
num_of_chars) of str_expr.
num_of_chars)
Removes
RTRIM(str_expr) trailing yes yes, extended yes
blanks.
SUBSTRING(str_expr SUBSTR(str_ex
Part of text. yes yes
, start, length) pr, start, length)
Uppercase
UPPER(str_expr) version of yes yes yes
string.