oracle sql concatenate column values

Read about oracle sql concatenate column values, The latest news, videos, and discussion topics about oracle sql concatenate column values from alibabacloud.com

Oracle row-to-column SQL

--Create table/*create table test_table (STUDENT VARCHAR2 ($), SUBJECT VARCHAR2 (+), GRADE number) Tablespace Syste M pctfree pctused Initrans 1 Maxtrans 255 storage (initial 64K minextents 1 Maxextents Unlimited); *//*insert into test_table (student, Subject, Grade) values (' Zhang San ', ' languages ', ') insert into test_table (student, Subject, G Rade) VALUES (' Zhang San ', ' Math ', ' Max ') insert in

The effect of sql-oracle in the realization of the column schema

In SQL Server, there is a function replicate () can implement the column chart effect, essentially using the number of occurrences of characters to control the length of the column chart, the effectIf you want to achieve the same effect within Oracle, you need to write a function yourself:CREATE OR REPLACE FUNCTION kth

Oracle cannot use variables as column names and table names, but dynamic SQL can be used;

ORACLE cannot use variables as column names and table names some of the individual validations are:1 DECLARE2Ename1 Emp.ename%TYPE;3TYPE Index_emp_type is TABLE of VARCHAR2( -)INDEX byPls_integer;4 index_emp Index_emp_type;5 BEGIN 6Index_emp (1) := 'E.ename';7 SELECTIndex_emp (1) intoEname1 fromEMP EWHEREE.empno=7369;8 EXECUTEIMMEDIATE'Select' ||Index_emp (1)|| 'From emp e where e.empno=7369' intoename1;

Total Pages: 4 1 2 3 4 Go to: Go

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.