Database name : test table names : order, order_shipping,order_payment
The query below gives me error
INSERT INTO order(order_status,customer_id) values('booked',1)
error : 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 'order(order_status,customer_id) values('booked',1)' at line 1
But the exact same query will work if i add database name before tablename
INSERT INTO test.order(order_status,customer_id) values('booked',1)
result : insertion successfull
I renamed tablename 'order' to 'order_main' and it works without database name
INSERT INTO order_main(order_status,customer_id) values('booked',1)
insertion successfull
My question is why does not my original query work without database name attached to table name. Is it because I have other tables starting with this table name ???
table in my database : order, order_shipping,order_payment