[Lone solitary Nine swords] Oracle Knowledge Point Grooming (10)%type and%rowtype and common functions

Source: Internet
Author: User

Link navigation in this series:

[Lone solitary Nine swords] Oracle Knowledge Point Grooming (a) table space, user

[Lone solitary Nine swords] Oracle Knowledge Point Grooming (ii) connection of databases

[Lone solitary Nine swords] Oracle Knowledge Point Grooming (iii) Import, export

[Lone solitary Nine swords] Oracle Knowledge Point Grooming (iv) DML and DDL for SQL statements

[Lone solitary Nine swords] Oracle Knowledge Point Grooming (v) table, View of common objects in database

[Lone solitary Nine swords] Oracle Knowledge Point Grooming (vi) procedure, function and Sequence of common objects in database

[Lone solitary Nine swords] Oracle Knowledge Point Grooming (vii) Cursor of common objects in database

[Lone solitary Nine swords] Oracle Knowledge Point Grooming (eight) common exception

[Lone solitary Nine swords] Oracle Knowledge Point Grooming (ix) database common objects of the package

[Lone solitary Nine swords] Oracle Knowledge Point Grooming (10)%type and%rowtype and common functions

5.8. The concept of%type and%rowtype

When defining a variable, use Person.name%type to set the variable type to the same type as the name field of the person table
Using V_roomrecord Rooms%rowtype is to align the structure of the V_roomrecord with the table structure of the table rooms

5.9, about the record, varray, table of the use of detailed

http://blog.csdn.net/liangweiwei130/article/details/38223319

5.10. Common functions in Oracle 5.10.1 Merge all fields of a column in a query result
Select  from where -- concatenate the Name field with commas
5.10.2 trunc Processing Date fields

Date format result can be obtained.

1 Select  from person;    -- get the date of birth of the person 2 Select  from where between trunc (sysdate-1and-- to find out who was born yesterday and today
5.10.3 concat merging two parameters
1 Select concat (' Harry ',' potter ' from-- get Harry Potter 2 Select  from -- get the name and age of the merged column
5.10.4 Type Conversions
1To_char (123)--> ' 123 '2To_number ('123')--> 1233To_date ('2015-03-15','YYYY-MM-DD')--March 15, 2015 of the > Time type4To_date ('2015-03-15 20:10:10','YYYY-MM-DD Hh24:mi:ss')--March 15, 2015 20:10:10 of the > Time type

Other functions to be continued:

[Lone solitary Nine swords] Oracle Knowledge Point Grooming (10)%type and%rowtype and common functions

Related Article

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.