create table Brazil_Health_WorkForce_Longitudinal_Study (Year INT, Number of Physicians INT, Number of Nursing/MidWifery INT, Number of Dentistry Personnel INT, Number of Pharmaceutical Personnel INT, Number of Public Health Workers INT,); insert into Brazil_Health_WorkForce_Longitudinal_Study (2008, 341849, 1243804, 227141, 104098, null,); insert into Brazil_Health_WorkForce_Longitudinal_Study (2000,null, null, null, null, 167080,);
Review of SQL Code
Page 1 of 13 Replies - 551 Views - Last Post: 31 October 2012 - 03:13 AM
#1
Review of SQL Code
Posted 30 October 2012 - 03:07 PM
I am working on a information management class where the final project is making a database using sqlite. I've written the code for one table. I have a couple questions: 1-Could take a look at eh code to see if there are errors? 2-I am working on an Oracle Associate Certificate in MySQL, and downloaded the MYSQL workbench, is that a good place to operate form. The book comes tomorrow. The course is using SQLite, but from what I can tell the syntax is identical to MYSQL. Am I right, at all?
Replies To: Review of SQL Code
#2
Re: Review of SQL Code
Posted 30 October 2012 - 11:50 PM
Quote
The course is using SQLite, but from what I can tell the syntax is identical to MYSQL.
more or less. there are commands unknown to SQLite (GROUP_CONCAT()), it is weakly typed, indexes work totally different, etc. you should always check in the SQLite documentation that what you do is correct.
#3
Re: Review of SQL Code
Posted 31 October 2012 - 03:06 AM
Where SQLite is not MySQL, I'll move this to the plain old Databases forum.
#4
Re: Review of SQL Code
Posted 31 October 2012 - 03:13 AM
I dont think you have specified a primary key. I dont know whether it would work in sqlite but in MySQL you can do:
create table sometable(ID INT NOT NULL AUTO_INCREMENT, ... ..., PRIMARY KEY(ID));
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote





|