On Thu, 3 Sep 2015 15:03:27 +0530, manash b <boruah.manash18 at gmail.com> wrote:
>Hello, > > >I am using SQLite version 3.8.11.1 and PHP for my web application. > >Table *employee* has 4 columns. Last two columns have default NULL values. > >Insert query - > > > >*INSERT INTO employee SELECT 3 AS 'eid','manash' AS 'name' > UNION SELECT 2,'ram' UNION** SELECT 1,'rahim'* > > >Getting error - > >["SQLSTATE[HY000]: General error: 1 table employee has 4 columns but 2 >values were supplied > > >How can i handle this? Please let me know. I think you are looking for: INSERT INTO employee (eid,name) VALUES (3,'manash'),(2.'ram'),(1,'rahim'); http://www.sqlite.org/lang_insert.html -- Regards, Kees Nuyt