SQL - What is better - a lot of small update statements or one big with a lot of OR clauses?
103351
to test what is quicker create a giant table of data (cross join query is really good at making tons of entries fast) then run the query 100 times on a table of 100,000 entries. (some slow queries you wont need nearly this many entries)\n\nTake note of the execution time and run the other way. You can then tweak the code and see whats faster. I got a sproc that took 1:30 seconds to aggregate and massage a years worth of 15 minute data to run in 0:02 seconds using this method and a little persistance...\n\ngood luck
799600
Use either Access or MySQL. 1000 records is very small, you do not need to pay the $thousands for MS SQL or Oracle. Access can definitely handle 1000 records.\n\nOne nice thing about Access is that it enables you to create forms. So people can input data using a visual form, and the data goes into the database. Also, Access offers a GUI for creating your database tables. MySQL does not offer these capabilities, but its main plus is that it is free. I would question what the other guy said about how powerful it is, though. It is definitely a lot weaker than Oracle or MS SQL, BUT for your needs it should be fine.\n\nEither Access or MySQL will work fine for Web programming too if you want to connect your db to an online Web site.
896456
mySQL should be part of your solution.\n///
70564
http://dev.mysql.com/doc/refman/5.0/en/sql-syntax.html\nYour best bet is to Start with MySQL, which is an Open Source Implementation, then learn SQL and then Database Design, and shortly after you will be a full fledged DBA
235181
1> When a lot of records exist in a single table, indexing is an issue\n2> Procedure compilation is a bit limited than oracle\n3> Works only on Windows platform\n4> No rollback segments as like in Oracle\n5> Archivelog not supported well as in oracle\n6> Not for very large data warehouses
360932
A stored procedure. Or, if there's no support for stored procedures per se, a function.\n\nGood luck with the rest of your homework!
861304
Add LIMIT 10 to the end of your sql command\n\na few example could include\n\nSELECT  * FROM table LIMIT 0 , 10\n\nor if you want only unique values to show use \n\nSELECT DISTINCT  field FROM table LIMIT 0 , 10\n\nor unique from all\n\nSELECT DISTINCT  *  FROM table LIMIT 0 , 10\n\nPm/IM me on yahoo:  Supermrnice if you would like a very useful tip i use
978704
You use limit in conjunction with 1 or 2 numbers. If you use 1 number like this:\n\nselect * from myTable limit 5;\n\nthen MySQL will grab the first 5 results from the table. However, if you use if like this:\n\nselect * from myTable limit 5,5;\n\nthen MySQL will grab 5 results, starting from record number 5. So it's\n\nlimit [startPos], [numberOfRecords]\n\nEnjoy -
879067
Use mySQL and secure it. Plus, once it is set up you can manipulate it so much easier.
785158
You cannot specify a minimum number of characters in SQL. You can only specify whether the field allows nulls or a max number of charactes. You would need to enforce character limits in your programming - either on the server-side or by using client-side validation to ensure a username is greater than 1 character. I would recommend doing both.
852284
It is sufficient, but it is not optimal.  Calculations of distance (for instance) in a GIS require formulas to be written within the SQL.  A QL that has these calculations supplied is better.
1002503
I hate the darn things. I have one in my name and it's a real pain.\n\nApplications written in SQL have a real problem with them too and usually error out if you include one.\n\n\nOther than that it's just plain lazy.
938312
INSERT INTO table_name (field1, field2, ...) VALUES ('value1','value2'...);
468235
You need to replace any quotes (" or ') with a second quote.\n\nSo if your comment is:\n\nI really liked when he said, "Go forth, wise one."\n\nYou would change it to:\n\nI really liked when he said, ""Go forth, wise one.""\n\nThat will allow the insert to propertly insert the state into the database.  Please note that it will not have two quotes in the database.\n\nSo if you did:\n\nSELECT Comment FROM MyTable\n\nYou would see:\n\nI really liked when he said, "Go forth, wise one."
700974
Try changing your field Password to something like pass. Password is a key word in SQL and therefore your update statement will not work. Give it a try and let me know if it works.\n\nHope this helps
743722
Hello,\nThe inner query, which is\n\nSELECT [Employee Information].FirstName, [Employee Information].LastName, Courses.CourseTitle, CoursesCompleted.CourseID\nFROM Courses INNER JOIN ([Employee Information] INNER JOIN CoursesCompleted ON [Employee Information].StudentID=Courses... ON Courses.CourseID=CoursesComple...\nWHERE (((CoursesCompleted.CourseID)=... THE COURSE NUMBER])))\n\nreturns a set of first names, last names, course titles and course id numbers; however you are checking whether >only< the first name and the last name of a particular employee is in that set. If I'm not mistaken, both sides of the 'NOT IN' clause should contain the same information. In this example, one side (outer query) contains the name of the employee, and the other side (inner query) contains the name of the employee + course information. \nTry this: in the second query select only the first and last name of the employee (not the course info) but keep the joins in the FROM clause.\n\nIf I had designed the tables, I would assign a unique id to each employee, just as courses have their unique course ids. It would have eased this task a lot.\n\nI know I sound confusing, but hope it helps
99695
What do you mean?\nMaybe "SQL command with two criteria?"?\n\nIn this case if you mean the condition "WHERE" you joint each condition with "AND".\nExample:"SELECT * FROM table WHERE field0 = 'value0' AND field1 = 'value1';"