Structured Query Language (Basics 2 video)

4

  • 6
  • 0
  • 0.078
  • Reply

  • Open in the desktop app ADD TO PLAYLIST

    gunu1

    Published on Dec 13, 2022
    About :

    As promised I'm back with another SQL tutorial, this one throws in some more basic concepts.
    The code I used is below:

    /*/////////////////////////////////////////////////////////////////////////

                        BASICS 2
    

    NOT NULL = Ensures that a column cannot have a NULL value
    UNIQUE = Ensures that all values in a column are different
    PRIMARY KEY = A combination of a NOT NULL and UNIQUE
    FOREIGN KEY = Prevents actions that would destroy links

    ///////////////////////////////////////////////////////////////////////////
    */

    SELECT * FROM Persons;
    CREATE TABLE Persons (
    ID int NOT NULL PRIMARY KEY,
    LastName varchar(255) NOT NULL,
    FirstName varchar(255),
    Age int
    );

    INSERT INTO Persons(ID,LastName,FirstName,Age) VALUES(
    001,
    'Abdul Rahman',
    '',
    24
    );

    INSERT INTO Persons(ID,LastName,FirstName,Age) VALUES(
    002,
    'Abdul Kahar',
    NULL,
    24
    );

    CREATE TABLE Class(
    ID INT FOREIGN KEY REFERENCES Persons(ID),
    Present VARCHAR(3) NOT NULL,
    Ddate VARCHAR(12) NOT NULL
    );

    INSERT INTO Class(ID,Present,Ddate) VALUES(
    002,
    'Yes',
    '13/12/22'
    );

    SELECT * FROM Class

    ALTER TABLE Class ADD signed VARCHAR(3)

    ALTER TABLE friends ADD PRIMARY KEY (contact)

    Tags :

    programming dev sql database tutorial proofofbrain neoxian ghana

    Woo! This creator can upvote comments using 3speak's stake today because they are a top performing creator! Leave a quality comment relating to their content and you could receive an upvote worth at least a dollar.

    Their limit for today is $0!
    Comments:
    Time until gunu1 can give away $0 to their commenters.
    0 Days 0 Hours 0 Minutes 0 Seconds
    Reply:

    To comment on this video please connect a HIVE account to your profile: Connect HIVE Account

    35:18
    11 views a year ago $
    12:30
    2 views 7 months ago $
    09:41
    0 views 6 months ago $

    More Videos

    00:29
    5 views 2 years ago $
    21:10
    8 views 2 years ago $
    00:26
    21 views 10 months ago $
    08:41
    12 views 2 years ago $
    01:33
    1 views 2 years ago $
    01:11
    3 views 8 months ago $
    01:10
    1 views 3 years ago $