Inserting Rows Without All Fields Specified? (SQL) - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Inserting Rows Without All Fields Specified? (SQL) (
/showthread.php?tid=515561)
Inserting Rows Without All Fields Specified? (SQL) -
DrakeX - 26.05.2014
I ran into an issue yesterday in SQL, so instead of creating the table during game-mode startup, I did so manually through the SQLite browser. Since there were about 50 fields, I used and set default values for fields. Later, I realized that I cannot insert new tables into rows unless I specify all the fields during the query. Is there a way around this? I thought that setting default values would have worked, but I guess not since I can't even insert rows now. The reason for all this is because of what I mentioned before, the 50 or so fields (my query string size would be 8000 - 1000). Thanks.
Re: Inserting Rows Without All Fields Specified? (SQL) -
Vince - 26.05.2014
If you need 50 fields you're probably doing it wrong. Nonetheless, the default values should work. You will still need to specify the necessary field names for the data you're inserting, though.