SELECT * FROM purchase order =
syntax error at end of input how to fix
CREATE TABLE "purchase order" (
"IBSN" INTEGER,
"Author" VARCHAR (200),
"num OF copies" INTEGER
)
Preferably, please don't use any white space in the table name or in the column name. Moreover, table name "purchase order" collides with the SQL keyword "order" which may lead to confusion. You should follow as below:
CREATE TABLE "purchase_order" (
"ISBN" INTEGER,
"Author" VARCHAR (200),
"num_of_copies" INTEGER
);
Also, you have misspelled ISBN as IBSN.
SELECT * FROM purchase_order; --> displays the whole database. If the db holds huge amount of data, you should not use this statement as it can cause the process to enter into a Long-running session. For that, you need to do indexing (just like putting page numbers to your 1000 pages of assignment) on your database.
INSERTING VALUE TO A TABLE:
INSERT INTO "purchase_order" (ISBN, Author, num_of_copies) VALUES ('1234455', 'Chetan Bhagat', '33');
CONDITIONAL DATA FETCHING:
SELECT * FROM purchase_order WHERE ISBN = 'YOUR_SEARCH_VALUE';
SELECT * FROM purchase_order WHERE Author= 'YOUR_SEARCH_VALUE';
SELECT * FROM purchase order = syntax error at end of input how to fix CREATE...