The server is Windows Server 2003. After the Oracle client is installed normally, when data is inserted, all Chinese characters are displayed ?.
Exception:
Enter select userenv ('language ') from dual in the PLL/SQL statement, and the result is
Suppose we have two tables: test1 and Test2.
Create
Table
Test1 (No
Number
, Name
Varchar2
(
10
));
Create
Table
Test2 (No
Number
, Name
Varchar2
(
10
));
Insert
Into
Test1
Values
(
1
,
Create a bat file named setupDB. bat and write the SQL code in it.
Sqlplus scott/tiger @ zhpt @ createUser. SQL
Imp dzjc/hldgajjzd file = "dzjc. dmp" ignore = y fromuser = dzjc
Imp drv_admin/oracleadmin file = "drv_admin.dmp" ignore = y
1. A common query statement, for example:SELECT last_name, department_id FROM employees;2. query viewSELECT employee_id, last_name, job_title, department_name, country_name,Region_name FROM emp_details_view;3. Change column name querySELECT
Oracle, DB2, and ms SQL Server all have QueryHint, which seems to have only one. Their forms in different databases are as follows:
Oracle:SELECT/* + FIRST_ROWS */* from t where (F1> 5)
Ms SQL ServerSELECT * from t where (F1> 5) OPTION (FAST 10)
This article also serves as a reference for using. NET Framework.
First, in JDBC:Oracle JDBC does not support executing multiple statements at a time. One solution is as follows: String str = "BEGIN ";Str + = "OPEN? For select * from emp ;";Str + =
1: Give the time, for example, "2011-7-23". query the day of the week;
Select to_char (to_date ('1970-7-23 ', 'yyyy-mm-dd'), 'day', 'nls _ DATE_LANGUAGE = American') from dual;
Result: Saturday
Select to_char (to_date ('1970-7-23 ', 'yyyy-mm-dd'),
The client architecture of the wcf server is used in recent projects. The client sends a request to the server to query a table. The wcf server then accesses the server database and returns the result to the client.There is a problem with this, that
Today, the blog of the 8-language version is intended to support Oracle, so there are a bunch of problems and summary:
1: how to retrieve the table from MSSQL and construct it to Oracle? I used the data export function and encountered the
SQL statement for querying and deleting duplicate records1. Search for redundant duplicate records in the Table. duplicate records are determined based on a single field (peopleId ).
Select * from people
Where peopleId in (select peopleId from
When SQL Server uses English strings for matching, the Case sensitivity is ignored by default, which is convenient to use. If you want to ignore the case sensitivity, you can modify the configuration, But Oracle does not seem to ignore the case
First, write the connection string.
You can write it in web. config.
Copy codeThe Code is as follows:
And then the back-end callCopy codeThe Code is as follows: string orclcon = ConfigurationManager. ConnectionStrings ["oracleson"].
When we use select sysdate + number from dual;, we get the current time plus the number day time. We can also see that the unit of time calculated in this way is day. If we want to obtain the system time plus a few hours, how should we calculate it?
1. DIRECTORYSpecifies the directory where the dump and log files are located
DIRECTORY = directory_object
Directory_object is used to specify the DIRECTORY object name. Note that the DIRECTORY object is an object created using the create directory
1. Insert
insert into dept values(50, 'soft', 'Guangzhou');
insert into dept(deptno, dname) values(60, 'software test');
insert into dept select * from dept where deptno = 20;
2. Delete
delete from dept where
Comparison of some simple commands of Oracle and mysql
1) SQL> select to_char (sysdate, 'yyyy-mm-dd') from dual;
SQL> select to_char (sysdate, 'hh24-mi-ss') from dual;
Mysql> select date_format (now (), '% Y-% m-% D ');
Mysql> select time_format
The current system time is the week of the year.
Copy codeThe Code is as follows: select to_char (sysdate, 'ww '), to_char (sysdate, 'iw') from dual;
Select to_char (sysdate, 'ddd ') from dual;
Select TRUNC (SYSDATE, 'mm') from dual; 1)
The ww
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service