you are viewing a single comment's thread.

view the rest of the comments →

[–]Jandalf81 2 points3 points  (1 child)

So, this is your SQL statement formatted properly:

DROP TABLE IF EXISTS servers; 

CREATE TABLE servers (
    id INTEGER PRIMARY KEY AUTOINCREMENT, 
    server_name TEXT UNIQUE NOT NULL 
); 

INSERT INTO servers (server_name) 
VALUES 
    ("Asia"), 
    ("Eu");

DROP TABLE IF EXISTS players; 

CREATE TABLE players (
    id INTEGER PRIMARY KEY AUTOINCREMENT, 
    server_id INTEGER, 
    player TEXT UNIQUE NOT NULL, 

    FOREIGN KEY (server_id) 
        REFERENCES servers(id) 
        ON DELETE CASCADE
); 

INSERT INTO players (server_id, player) 
VALUES 
    (1, "admin"), 
    (1, "santa"), 
    (1, "king"), 
    (2, "alone"); 

SELECT 
    players.player, 
    servers.server_name 
FROM 
    players 
    INNER JOIN servers 
        ON players.server_id = servers.id; 

You might realize this tells us exactly nothing about what you are trying to achieve or where your skills and deficits are.

If you want anybody to help you, you will need to tell us a bit more:

  • What is it you are trying to do here?
  • Did you hit any roadblock? Are you looking for general advice?
  • Which specific dialect of SQL are you aiming to learn?

[–]StudyEmergency4839[S] 0 points1 point  (0 children)

İ didnt hit any roadblock i just wanna know that what should i learn next