Qualify the column name with table name and database name : Database Join « Join « SQL / MySQL






Qualify the column name with table name and database name

      

CREATE   TABLE TEAMS
        (TEAMNO         INTEGER      NOT NULL,
         EmployeeNO       INTEGER      NOT NULL,
         DIVISION       CHAR(6)      NOT NULL,
         PRIMARY KEY    (TEAMNO)             );


INSERT INTO TEAMS VALUES (1,  6, 'first');
INSERT INTO TEAMS VALUES (2, 27, 'second');


SELECT   TENNIS.TEAMS.TEAMNO
FROM     TENNIS.TEAMS;


drop table teams;

   
    
    
    
    
    
  








Related examples in the same category

1.If the current database is database1 or database2, you can dispense with some of the qualifiers.
2.if the current database is database2, no database2 qualifiers are necessary
3.Qualify the table name with database name