SQL Syntax Examples: Difference between revisions

From Free Knowledge Base- The DUCK Project
Jump to navigation Jump to search
No edit summary
mNo edit summary
Line 2: Line 2:


# SELECT * FROM customers;
# SELECT * FROM customers;
# SELECT grade, age, reportcategory FROM students WHERE classroom = 3;
# SELECT username FROM usertable WHERE username like "%icol%";
# SELECT username FROM usertable WHERE username like "%icol%";
# DESCRIBE TABLE customer;
# DESCRIBE TABLE customer;

Revision as of 08:38, 1 July 2017

Examples

  1. SELECT * FROM customers;
  2. SELECT grade, age, reportcategory FROM students WHERE classroom = 3;
  3. SELECT username FROM usertable WHERE username like "%icol%";
  4. DESCRIBE TABLE customer;
  5. SELECT usertable.UserName, Posts.PostID FROM usertable LEFT JOIN Posts ON usertable.UserID = Posts.UserID ORDER BY usertable.UserName;

Other Pages with SQL Examples