Understanding Oracle, creating users, and understanding data types

Source: Internet
Author: User

Understand Oracle, create users, and understand data types!

Goal: Understand the orale Database

  1. I. Data Types in Oracle:
  2. Number Type:
  3. A) number indicates the number type, but if there is a decimal number, it must be written as follows: number (total number of digits, decimal number)
  4. B) Apart from number, oracle still supports various data types in Sqlserver. For example:Int,Float,Double, AndIntegerEncapsulation data type, but I
  5. We usually use the number type, and others are not recommended!
  6. Character Type:
  7. A) varchar2. in oracle, The varchar2 data type is recommended.VarcharData Type! Of courseVarcharIt is also supported!
  8. B) long, which indicates a super-long string. It can be up to two GB and is a bit like text in Sqlserver!
  9. C) and others, such as: nvarchar2,Nchar
  10. Date type:
  11. A)DateIs the most common date type!
  12. Binary data type:
  13. A) raw, indicating binary data
  14. B) long raw, ultra-long binary data
  15. C) The maximum length of BLOB binary data is 4 GB.
  16. D) The maximum length of CLOB characters is 4 GB.
  17. E) the maximum length of NCLOB character data depends on the character set.
  18. F) The maximum length of binary data stored in BFILE outside the database is 4 GB.
  19. Special pseudo column types:
  20. A) the unique row number recorded in the ROWID data table is in the format of 10 bytes *********. *****. ******. * 0 or 1.
  21. B) the maximum length of the unique row number recorded in the NROWID binary data table is 4000 bytes.
  22. 2. Role Relationship authorization and cancellation in oracle:
  23. Create a user (the premise is that you have the permissions to create a user, usually DBA ):
  24. Create UserUser name identifiedByPassword;
  25. Delete A User:
  26. DorpUserUser Name
  27. Grant permissions to users:
  28. GrantPermission 1, permission 2 ,...ToUser name;
  29. Several common permissions:
  30. CreateSession: Database login power
  31. Create Table: Create a table
  32. Alter Table: Modify Table
  33. ....
  34. Cancel User power:
  35. RevokePermission 1, permission 2 ,...FromUser name;
  36. Special:
  37. AddWithXXXXOptionThis gives the user special ownership. This is because the authorized person still has this permission after the authorized person is deleted!
  38. Eg:Grant Create Table ToScottWith Grant/AdminOption;
  39. Where: "grand" indicates operations on user schemes such as adding, deleting, modifying, and querying tables, and "admin" indicates system management schemes such as creating and Deleting Users ....!
  40. Once and for all:
  41. When many permissions are granted to users, it is too difficult to set them one by one, so we need to use the Role authorization method:
  42. Grand role 1, role 2 ,...ToUser name;
  43. We usually useConnect, Resource!
  44. Eg: grandConnect, ResourceToLovingshu;
  45. 3. User Information Modification
  46. Keywords:Alter
  47. Here, the most used is to unlock users:
  48. Eg:Alter UserScott account unlock;--- Unlock scott user!

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.