Oracle Demo->> CREATE TABLE

Source: Internet
Author: User

CREATE TABLEEmployees_demo (employee_id Number(6), first_nameVARCHAR2( -), last_nameVARCHAR2( -)CONSTRAINTEmp_last_name_nn_demo not NULL, emailVARCHAR2( -)CONSTRAINTEmp_email_nn_demo not NULL, Phone_numberVARCHAR2( -), hire_date dateDEFAULTsysdateCONSTRAINTEmp_hire_date_nn_demo not NULL, job_idVARCHAR2(Ten)CONSTRAINTEmp_job_nn_demo not NULL, Salary Number(8,2)CONSTRAINTEmp_salary_nn_demo not NULL, commission_pct Number(2,2), manager_id Number(6), department_id Number(4), DNVARCHAR2( -), CONSTRAINTEmp_salary_min_demoCHECK(Salary> 0), CONSTRAINTEmp_email_uk_demoUNIQUE(email)) Tablespace examplestorage (INITIAL6144NEXT 6144minextents1MAXEXTENTS5);

This example shows that there are some differences compared to SQL Server, such as

1) Whether NULL is allowed to become contraint under Oracle

2) Then a named contraint can be implemented in the code block of the CREATE table

3) getdate () under SQL Server becomes sysdate under Oracle

4) The FILEGROUP option under SQL Server becomes tablespace under Oracle, and of course the two are quite large.

Oracle Demo->> CREATE TABLE

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.