Createtypechar_tableistableofvarchar2 (4000); -- create a custom type script createorreplacefunctionsplit_string (pi_strin
Create type char_table is table of varchar2 (4000); -- create a custom type script create or replace function split_string (pi_str in
Create type char_table is table of varchar2 (4000); -- create a custom type script
Create or replace fu
nvarchar (4000)
Set @ s =''
Select @ s = @ s + ',' + quotename ([course]) + '= max (case when [course] =' + quotename ([course], '''') + 'then [score] else 0 end )'
From class group by [course]
Exec ('select [Student] '+ @ s +' from class group by [Student] ')
Generate static:
Select
[Student],
[Mathematics] = max (case when [course] = 'mate' then [score] else0End ),
[Physical] = max (case when [course] = 'physical 'Then [sc
recommended to print the @sql\ @CMD variables before execution.4. This issue can be used as an archiving scheme. Recommended reference for my blog:SQL Server Data Archiving Scenariosetnocounton;--Define Variables DECLARE @FullTableName nvarchar ( ) -- Full table name NBSP;NBSP;NBSP;NBSP;NBSP;NBSP;NBSP;NBSP;NBSP;NBSP, @BulkInsertFolder nvarchar (4000) --Data Catalog NBSP, @ArchiveFolder nvarchar (4000)
See Code annotations for application notes.1. Simple Search Examples show: public void Search () throws IOException {//Custom cluster node name String clustername = "elasticsearch_pudongping"; Get Client clients = Esclient.initclient (clustername); Create a query index, the parameter Productindex represents the index library to query for Productindex searchrequestbuilder searchrequestbuilder = client. P Reparesearch ("Productindex"); Set the query index type, settypes ("P
VALUEFROM all_objectsWHERE rownum
-- Create a unique indexCreate unique index unq_a ON a (id );
-- Use the system package to create the corresponding error log table
EXEC DBMS_ERRLOG.create_error_log (dml_table_name => 'A', err_log_table_name => 'A _ log ');
PL/SQL procedure successfully completed.
SQL> desc A_LOGName Null? Type----------------------------------------------ORA_ERR_NUMBER $ NUMBER -- NUMBER of error recordsORA_ERR_MESG $ VARCHAR2 (2000) -- error messageORA_ERR_ROWID $ ROWID --
bytes, that is, English characters are also expressed in two bytes. The length of nchar and nvarchar is between 1 and 4000. Compared with char and varchar,Nchar and nvarchar can store a maximum of 4000 characters, both in English and Chinese. char and varchar can store up to 8000 English and 4000 Chinese characters.. It can be seen that when using nchar and nvar
The undo mechanism is a clever feature of Oracle and one of the difficulties in learning oracle.
Next we will learn more about it internally.
Session 1: Scott user, initiates a transaction
hr@ORCL> conn scott/oracleConnected.scott@ORCL> UPDATE emp SET sal=4000 WHERE empno=7788;1 row updated.scott@ORCL> SELECT empno,ename,job,mgr,sal FROM emp WHERE empno=7788; EMPNO ENAME JOB MGR SAL---------- ---------- --------- ---------
-- Exchange of rows and columns/*************************************** **************************************** **************************************** *******************************Take student scores as an example, which is easy to understand
Organized by: Roy)
Date: 2008.06.06**************************************** **************************************** **************************************** ******************************/
-- 1. Columns of rows--> (Roy) generate a sequence numberIf no
, nvarchar, and ntext. The three names are named N more than the first three ". It indicates that characters of the Unicode data type are stored. We know that only one byte is required for English characters, but there are many Chinese characters and two bytes are required for storage. It is easy to cause confusion when both English and Chinese characters exist,Unicode Character Set is generated to solve the incompatibility problem of character sets. All its characters are expressed in two bytes
value. That is, the interval range of each box is a constant called the box width.
User-defined intervals: You can customize intervals as needed. This method can be used to help you easily observe the data distribution within certain intervals.
For example, the value of the customer's income attribute income after sorting (RMB): 800 1000 1200 1500 1500 1800 2000 2300 2500 2800 3000 3500 4000 4500. The binning result is as follows.
Uniform weight: Set
()
'Do something here
End Sub
End Class
Subprograms and functions are called methods. Method naming also follows the naming rules of Pascal.
Another type of member is a domain. Domain naming rules follow the camel rules, that is, the first letter of all substrings except the first substring is capitalized. Like salary and quarterlyBonus are domain names that comply with the rules. The following code adds the salary and quarterlyBonus fields to the Employee class:
Added two fields of the Employe
destination 192.168.1.2 0 time-Range Test
[H3C-acl-adv-3000] Quit
(3) apply ACL on the port
# Apply ACL 1/0 to port ethernet 3000/1.
[H3C] interface ethernet1/0/1
[H3C-Ethernet1/0/1]QoS
[H3C-qoss-Ethernet1/0/1] packet-filter Inbound IP-group 3000
(1) define a time period
# Defines the period from.
[H3C] Time-range test8: 00 to 18: 00 daily
(2) define ACL rules for Mac 000f-e20f-0101 destination: 000f-e20f-0303
# Access the ACL 4000 View
[H3C] ACL n
Create procedure getrecordfrompage@ Tblname varchar (255), -- table name@ Fldname varchar (255), -- field name@ Pagesize Int = 10, -- page size@ Pageindex Int = 1, -- page number@ Iscount bit = 0, -- returns the total number of records. If the value is not 0, the system returns@ Ordertype bit = 0, -- set the sorting type. If the value is not 0, the sorting type is descending.@ Strwhere varchar (4000) = ''-- Query condition (Note: Do not add where)As
D
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.