How to create a table in oracle?

by elise_daugherty , in category: MySQL , 2 months ago

How to create a table in oracle?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by wilmer.lemke , 2 months ago

@elise_daugherty 

To create a table in Oracle, you can use the following SQL statement:

1
2
3
4
5
6
CREATE TABLE table_name (
    column1 datatype,
    column2 datatype,
    column3 datatype,
    ...
);


For example, if you wanted to create a table called "employees" with columns for employee ID, name, and salary, the SQL statement would look like this:

1
2
3
4
5
CREATE TABLE employees (
    employee_id INT,
    name VARCHAR(50),
    salary DECIMAL(10,2)
);


After running this SQL statement in Oracle SQL Developer or another SQL client, the "employees" table will be created in your Oracle database with the specified columns.