Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
I'm attempting to insert a new row into a table and I am getting a syntax error. I successfully inserted rows into different tables in the same database withe the same format with no issues. The scrip is as follows
INSERT INTO Ordertbl(OrdNo, OrdDate, CustNo, EmpNo, OrdName, OrdStreet, OrdCity, OrdState, OrdZip)
VALUES ('O1234567', '2030-1-25', '49908905', '55138445', 'John Smith', 'Milwaukee', 'WI', '53122-4523')
You specified nine columns but only eight values. You're missing the street.
Related
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 days ago.
Improve this question
Image of two sequel queries
Basically, I want it to display all films with language name spanish and show the amount of actors in each.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 days ago.
Improve this question
class table
class table
students table
students table
teacher's table
teacher's table
expected output table
expected output table
i tried left join but i am getting multiple record's getting.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed last year.
Improve this question
Wanted to delete complete row, which contains NULL entries in sql with command
DELETE FROM student WHERE ID=NULL;
What is wrong in this code?
Your syntax is incorrect you need to check for IS NULL
DELETE FROM student WHERE ID IS NULL;
Adding link to documentation thanks to D M
Working with NULL values
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
I have the following table where there are two relevant fields for searching, this is 'from' and 'to' and represents the range of employees and then the field 'InitialQMSDays' represents the value that I want to return.
So if I have a search value of say 6, it would look at that value and find it between the 6 - 10 row, and return 2.
any ideas?
SELECT InitialQMSDays
FROM my_table
WHERE 6 BETWEEN `From` AND `To`;
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
Hi I need to update multiple rows in a table so I wrote below query, but it only updates the first row and not the others. Please help.
Query:
String sql = "REPLACE INTO subscriber_metadata (msisdn, have_had_speech_pkg, have_had_sms_pkg, created, changed) values ";
Well REPLACE INTO does the following DELETE + INSERT, what you're looking for is UPDATE, doc over here
REPLACE INTO is nothing more than a mechanical DELETE and INSERT. It can incite mysqld to address deadlocks (See my answer to How I prevent deadlock occurrence in my application?)