02-insert.sql 408 B

12345678910111213141516171819202122
  1. CREATE TABLE students (
  2. id INT,
  3. name VARCHAR(25),
  4. major VARCHAR(25),
  5. PRIMARY KEY(id)
  6. );
  7. .mode table
  8. .nullvalue NULL
  9. /*
  10. * Inserta información
  11. * en la tabla de estudiantes.
  12. */
  13. INSERT INTO students VALUES(1, 'Jack', 'Biology');
  14. INSERT INTO students VALUES(2, 'Kate', 'Sociology');
  15. -- Define la información a insertar.
  16. INSERT INTO students(id, name) VALUES(3, 'Claire');
  17. SELECT * FROM students;