Anyone know SQL

diablo911diablo911 nonePosts: 36Member ■■■□□□□□□□
Im self learning this since its been 3 years at the junior college when i last took an SQL class, i forget everything and i have another sql class coming up this semester towards that dam 4 year degree, i have no idea why im getting this error, any ideas.

CREATE TABLE 'company'.'employee'(
'fname' VARCHAR(15) NOT NULL,
'mname' CHAR NULL,
'lname' VARCHAR(15) NOT NULL,
'ssn' CHAR(9) NOT NULL,
'Bdate' DATE,
'Address' VARCHAR(35) NOT NULL,
'Sex' CHAR NULL,
'Salary' DECIMAL(10,2) NULL,
'Super_ssn' CHAR(9) NULL,
PRIMARY KEY ('ssn'));

09:32:03    CREATE TABLE 'company'.'employee'( 'fname' VARCHAR(15) NOT NULL, 'mname' CHAR NULL, 'lname' VARCHAR(15) NOT NULL, 'ssn' CHAR(9) NOT NULL,  'Bdate' DATE, 'Address' VARCHAR(35) NOT NULL, 'Sex' CHAR NULL, 'Salary' DECIMAL(10,2) NULL, 'Super_ssn' CHAR(9) NULL,  PRIMARY KEY ('ssn'))    Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''company'.'employee'( 'fname' VARCHAR(15) NOT NULL, 'mname' CHAR NULL, 'lname' V' at line 1    0.000 sec


Comments

  • JDMurrayJDMurray Certification Invigilator Surf City, USAPosts: 11,386Admin Admin
    The single quotes around the table name look odd to me. I would expect to only see quotes inside of parens. What SQL database are you using?
  • diablo911diablo911 none Posts: 36Member ■■■□□□□□□□
  • diablo911diablo911 none Posts: 36Member ■■■□□□□□□□
    i figured it out, im good. Just when i thought computers couldnt get anymore boring, SQL Jesus Christ.
  • Infosec_SamInfosec_Sam Security+, CCENT, ITIL Foundation, A+ Madison, WIPosts: 335Admin Admin
    edited August 13
    What ended up being the issue? Was it the single quote thing that JDMurray mentioned?
    Community Manager at Infosec!
    Who we are | What we do
  • diablo911diablo911 none Posts: 36Member ■■■□□□□□□□
    @Infosec_Sam Ya single quotes, i just half to get through this semester and ill never half to touch it again as long as i breath.
  • AvgITGeekAvgITGeek 70-410, 70-411 Posts: 337Member ■■■■□□□□□□
    edited August 14
    SQL. You either love it or you hate it. Why do you think the SQL certification forum is dead?
    Never worked with MySQL. Only a little bit of Oracle and Progress but mostly MS SQLServer.
  • Infosec_SamInfosec_Sam Security+, CCENT, ITIL Foundation, A+ Madison, WIPosts: 335Admin Admin
    Yeah, I have a database class coming up this fall semester, so I'm really hoping to learn a bit more about SQL and database design. I had a similar class at the tech school a few years ago, but that was almost exclusively MS Access GUI work, which wasn't really doing it for me.
    Community Manager at Infosec!
    Who we are | What we do
  • AvgITGeekAvgITGeek 70-410, 70-411 Posts: 337Member ■■■■□□□□□□
    edited August 15
    So you are taking an admin class rather than a querying class? Administration is the easy part. Querying is a completely different animal. I learned the former and loved it and then learned the querying part and loved that as much or more than just admin.
  • Infosec_SamInfosec_Sam Security+, CCENT, ITIL Foundation, A+ Madison, WIPosts: 335Admin Admin
    Class Description: "Introduces the design and development of different types of electronic information systems, including database types, design issues, application development, and software selection and evaluation."
    Yeah, it looks like it's going to mostly high-level stuff. I'm right there with you though - I think it's super interesting, and I'd love to get down and dirty with SQL querying! 
    Community Manager at Infosec!
    Who we are | What we do
  • AvgITGeekAvgITGeek 70-410, 70-411 Posts: 337Member ■■■■□□□□□□
    I'm interested to hear about the class @Infosec_Sam. Post back after it starts. This is my first gig where I'm 100% the SQL guy so I'm in it all day and still trying to learn what data is where and what does it mean. 4.5 months in and I still feel blind some days. lol!
Sign In or Register to comment.