SQL   19

sql

Guest on 22nd September 2022 01:18:54 PM

  1. CREATE TABLE cat (
  2. id INT(10) NOT NULL AUTO_INCREMENT,
  3. catName VARCHAR(100) NOT NULL,
  4. catDesc VARCHAR(255) NOT NULL,
  5. catKeywords VARCHAR(255) NOT NULL,
  6. PRIMARY KEY(id)
  7. );
  8. CREATE TABLE listing (
  9. id INT(10) NOT NULL AUTO_INCREMENT,
  10. cat_id INT(10) NOT NULL,
  11. title VARCHAR(200) NOT NULL,
  12. url VARCHAR(255) NOT NULL,
  13. description text NOT NULL,
  14. PRIMARY KEY(id)
  15. );
  16. CREATE TABLE temp (
  17. id INT(10) NOT NULL AUTO_INCREMENT,
  18. cat_id INT(10) NOT NULL,
  19. title VARCHAR(200) NOT NULL,
  20. url VARCHAR(255) NOT NULL,
  21. description text NOT NULL,
  22. PRIMARY KEY(id)
  23. );
  24. CREATE TABLE vote (
  25. id INT(10) NOT NULL AUTO_INCREMENT,
  26. user_ip VARCHAR(50) NOT NULL,
  27. voter VARCHAR(20) NOT NULL,
  28. title VARCHAR(200) NOT NULL,
  29. vote INT NOT NULL,
  30. rated_id INT(10) NOT NULL,
  31. DATE TIMESTAMP,
  32. comment VARCHAR(255) NOT NULL,
  33. PRIMARY KEY(id)
  34. );
  35. INSERT INTO cat(catName, catDesc, catKeywords) VALUES("Web design","Web design is a collection of website that offer web design service","web design directory, top web design service");
  36. INSERT INTO cat(catName, catDesc, catKeywords) VALUES("Script Directory","This category offer you a list of the best scripting directory","script, free script");
  37. INSERT INTO cat(catName, catDesc, catKeywords) VALUES("Web hosting","Check out for the best web hosting service on the net which are voted by members around the world","web hosting");
  38. INSERT INTO cat(catName, catDesc, catKeywords) VALUES("Domain name","Check out for the best domain name registrar on the net which are voted by members around the world","domain name");
  39. INSERT INTO cat(catName, catDesc, catKeywords) VALUES("Tutorial","Check out for the best website that offer tutorial","web design tutorial, programming tutorial");
  40. INSERT INTO cat(catName, catDesc, catKeywords) VALUES("Web Tools","Web site that offer web based web tools","Webmaster tools, web tools");

Raw Paste


Login or Register to edit or fork this paste. It's free.