• Friday , 14 December 2018

SQL Tutorial – 9: Create Table Statement

Code Canyon



In this tutorial we’ll learn to create tables in SQL using the CREATE TABLE Statement.

Original source

3d Ocean

Related Posts

21 Comments

  1. Avaneet Chowdhary
    October 8, 2018 at 04:32

    accha h bt language me thodi problem h

    so …thaku for that

  2. ATIKUR RAHMAN
    October 8, 2018 at 04:32

    Sir … What is this application software

  3. Rogelio Cruz
    October 8, 2018 at 04:32

    Thanks a lot man, you made it very simple!

  4. Geeta Yadav
    October 8, 2018 at 04:32

    Ratahe kya kya bol rage ho

  5. Rohit Bhardwaj
    October 8, 2018 at 04:32

    where are u doing this on which database

  6. Manju Bajaj
    October 8, 2018 at 04:32

    suppose i want to create a table name ABC using DDL queries… in this table we have a column named as month.. i want that values of month should integer between 1 and 12 only? can u plz help me how to write a DDL query for this in MS-Access?

  7. ALESSANDRA PUCCIO
    October 8, 2018 at 04:32

    thank you

  8. westfield90
    October 8, 2018 at 04:32

    How do you specify Auto Increment and also collate charset etc?

  9. shamim ahsan
    October 8, 2018 at 04:32

    Is it case sensitive language?

  10. ronoy188
    October 8, 2018 at 04:32

    what software

  11. Rukhsar Usmani
    October 8, 2018 at 04:32

    which software is it?

  12. ANIRBAN
    October 8, 2018 at 04:32

    I wrote datatypes in uppercase then compilation told that table not formed ,but in lowercase it formed ,Why?you told that they are not case sensitive

  13. Nour Kenitra
    October 8, 2018 at 04:32

    Still unclear
    We need a clear practice

  14. HIRAK MONDAL
    October 8, 2018 at 04:32

    The concept of primary key must be taught first then all these…

  15. Moshfiqur Raham Bakshi
    October 8, 2018 at 04:32

    Thank you so much for sharing it.

  16. Amit Kumar Gaur
    October 8, 2018 at 04:32

    Thanks for video bt I also want Oracle and java core,advance full video pls help me sir

  17. malik fayiz
    October 8, 2018 at 04:32

    Thank you for posting the video, I appreciate it.

  18. Amol Mundada
    October 8, 2018 at 04:32

    plz tell me why ID field can not hold NULL values…in video at time 7:00

  19. Moepi Maile
    October 8, 2018 at 04:32

    Sir Can you check if my answer to this question is right pls
    Write a single SQL statement to create a new table named Login with five columns: Username(Text), Password(Text) LastUpdate(Date) Status(Text) and CustomerID(Interger)

    Assign Username as the primary key of the table
    The Password should never be NULL
    Set the default value of LastUpdate to the current date and time (Aust Time)
    Define a check on Status to make sure the value could either be active or inactive
    Assign CustomerID as a foreign key referencing the Customer table

    ANSWER
    CREATE TABLE Login
    (Username TEXT PRIMARY KEY NOT NULL,
    Password TEXT NOT NULL,
    Last Update DATETIME DEFAULT GETDATE (NZTIME),
    Status TEXT CHECK (Status = "active" OR Status = "inactive"),
    FOREIGN KEY (CustomerID) REFERENCE Customer (CustomerID) ON DELETE NO ACTION ON UPDATE NO ACTION
    )

  20. Subrat Mohapatra
    October 8, 2018 at 04:32

    though the output is executing correctly, there are red cross symbols against the steps written in the workbench.Can u pls clarify on the same ?

Leave A Comment

You must be logged in to post a comment.