Skip to content

Instantly share code, notes, and snippets.

@HeeroYuy
Created May 8, 2012 12:54
Show Gist options
  • Save HeeroYuy/2634683 to your computer and use it in GitHub Desktop.
Save HeeroYuy/2634683 to your computer and use it in GitHub Desktop.
SQL語法練習
1. select * from students where stud_sex='F' and stud_name LIKE'_美_'
2. select * from students where stud_addr IN('彰化縣' ,'台中縣' ,'台中市' )order by stud_no desc
3.select stud_addr,count(*) from students group by stud_addr having count(*)>1
4. select course.c_name,course.credit from course INNER JOIN study ON course.c_no=study.serial_no where study.stud_no=(SELECT stud_no FROM students WHERE stud_name='張文傑')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment