Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Victor
Jun 18, 2004
  1. You can remove `dept` to `news`; they are irrelevant for the question at hand.
  2. You haven't included any foreign key declarations.

Adbot
ADBOT LOVES YOU

Victor
Jun 18, 2004
Nope, those KEY statements are apparently indexes, according to MySQL's CREATE TABLE documentation. Think about it: your KEY statements aren't referencing the primary tables!

Victor
Jun 18, 2004
You need commas at the end of your MOVE lines.

Victor
Jun 18, 2004
Man, do you guys have any text left on your ` key, or has it all rubbed off?

Victor
Jun 18, 2004
Isn't it because MySQL's syntax errors are insanely useless? (Therefore, you're in constant fear of using a word that might be a keyword.) Or that's the story I've heard. Maybe I'm just too used to the modern luxury of syntax coloring...

Victor
Jun 18, 2004
Makes me think of Hungarian notation, except worse.

Victor
Jun 18, 2004
You need at least one column in a create table statement?

Victor
Jun 18, 2004
Have you tried quoting the names with backticks? Also, your second CREATE TABLE has too many commas. I forget, does MySQL allow trailing commas after the last column/constraint definition?

Victor fucked around with this message at 11:19 on Apr 29, 2010

Victor
Jun 18, 2004
Does anyone make a tool that checks MySQL for syntax errors and provides, ya know, good error messages? The MySQL 5.x errors when I use the CLI tool are just horrific! I can't believe the foolishness that is "comment out most of the code and see if it accepts, now comment out a little less". That'd probably be my biggest reason not to use MySQL; I want to spend my time writing code, not troubleshooting things a computer should be able to do, trivially. (nerrrrd rage)

Victor
Jun 18, 2004
Does it work without the OUTPUT clause?

Victor
Jun 18, 2004
You should be able to run a syntax check on it without executing it.

Adbot
ADBOT LOVES YOU

Victor
Jun 18, 2004

Factor Mystic posted:

I need to get up to speed on programming for SQL Server 2008 with regards to SQL basics, triggers, stored procedures, and functions (UDFs). My current database knowledge extends to basic select/insert/update/delete queries and basic joins, from writing hobby web projects in MySQL.

Can anyone recommend any good or well known books on the topic which I could study? Has anyone read Microsoft SQL Server 2008 T-SQL Fundamentals and what did you think?
How computer-sciencey are you? The Caltech databases course uses Databse System Concepts, which is alright. I really liked Database in Depth, which explains some of the theoretical underpinnings of relational databases that will expand your brain. However, both of these are more academic than you may prefer.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply