1

Requirement:I don't want to create database by using any java class.I want to have schema.sql( to create database and tables) and seeddata.sqlite(to insert data to tables) files for my android Application.When my application first time runs it should run schema.sqlite and then seeddata.sql.
Problem:I am not getting how to do this.

1
  • read your files line by line (java.io.BufferedReader#readLine) and use SQLiteDatabase#execSQL Commented Nov 24, 2017 at 6:14

1 Answer 1

3

If I understand your question the following may be along the lines of what you are looking for :-

    SQLiteDatabase db = SQLiteDatabase.openOrCreateDatabase(this.getDatabasePath("mydb"),null);
    // Loop through schema.sql (Noting that execSQL will only execute 1 SQL statment at a time)
    db.execSQL("CREATE TABLE IF NOT EXISTS tablea (_name TEXT, _anotherrow TEXT, _etc TEXT)");
    if (DatabaseUtils.queryNumEntries(db,"tablea") < 1) {
        // Loop through seeddata here (if actual SQL then use execSQL)
        ContentValues cv = new ContentValues();
        cv.put("_name", "This is the name.");
        cv.put("_anotherrow", "Someother data");
        cv.put("_etc", "and on and on.....");
        db.insert("tablea", null, cv);
    }
    Cursor csr = db.query("tablea",null,null,null,null,null,null);
    while (csr.moveToNext()) {
        Log.d("TABLEINFO","Row " + csr.getPosition());
        for(String s: csr.getColumnNames()) {
            Log.d("TABLEINFO","\tColumn=" + s + " Data=" + csr.getString(csr.getColumnIndex(s)));
        }
    }

This will

  • create the database named mydb, if it doesn't exist and then open the database.
  • try to create the table named tablea if it doesn't exist.
  • check how many rows are in the table and if the number is less than 1 then
    • insert a row
  • extract the data into the Cursor name csr
  • For each row in the table it will
    • Write a line to the log detailing the row number (0 as first) then for each column
    • Write a line to the log detailing the column name and the data from that column for the row.

e.g.

11-24 17:06:04.601 3360-3360/? D/TABLEINFO: Row 0
11-24 17:06:04.601 3360-3360/? D/TABLEINFO:     Column=_name Data=This is the name.
11-24 17:06:04.601 3360-3360/? D/TABLEINFO:     Column=_anotherrow Data=Someother data
11-24 17:06:04.601 3360-3360/? D/TABLEINFO:     Column=_etc Data=and on and on.....

Complete working solution

  • 1 File schema.sql, which has been placed into the assets folder (in this case for a project named ImportSchemaAndData D:\Android_Applications\ImportSchemaAndData\app\src\main\assets\schema.sql)

:-

CREATE TABLE tablea (_id INTEGER PRIMARY KEY, _name TEXT, _otherdata TEXT, _etc)
CREATE TABLE tableb (_id INTEGER PRIMARY KEY, _name TEXT, _otherdata TEXT, _etc)
CREATE TABLE tablec (_id INTEGER PRIMARY KEY, _name TEXT, _otherdata TEXT, _etc)
  • 2 File seeddata.sql (likewise placed into assets folder)

:-

INSERT INTO tablea (_name,_otherdata, _etc) VALUES("Fred","Data for Fred","even more data for Fred.")
INSERT INTO tablea (_name,_otherdata, _etc) VALUES("Bert","Data for Bert","even more data for Bert.")
INSERT INTO tablea (_name,_otherdata, _etc) VALUES("Tom","Data for Tom","even more data for Tom.")
INSERT INTO tablea (_name,_otherdata, _etc) VALUES("Harry","Harry has this data.","Harry has even more data.")
INSERT INTO tableb (_name,_otherdata, _etc) VALUES("Fred","Data for Fred","even more data for Fred.")
INSERT INTO tableb (_name,_otherdata, _etc) VALUES("Bert","Data for Bert","even more data for Bert.")
INSERT INTO tableb (_name,_otherdata, _etc) VALUES("Tom","Data for Tom","even more data for Tom.")
INSERT INTO tableb (_name,_otherdata, _etc) VALUES("Harry","Harry has this data.","Harry has even more data.")
INSERT INTO tablec (_name,_otherdata, _etc) VALUES("Fred","Data for Fred","even more data for Fred.")
INSERT INTO tablec (_name,_otherdata, _etc) VALUES("Bert","Data for Bert","even more data for Bert.")
INSERT INTO tablec (_name,_otherdata, _etc) VALUES("Tom","Data for Tom","even more data for Tom.")
INSERT INTO tablec (_name,_otherdata, _etc) VALUES("Harry","Harry has this data.","Harry has even more data.")

Note you may have to create the assets folder (see above for location)

  • 3 The Code (in this case in MainActivity)

:-

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        InputStream schema, seeddata;
        String lineofdata;
        SQLiteDatabase db;
        Cursor csr;

        try {
            schema = this.getAssets().open("schema.sql");
            seeddata = this.getAssets().open("seeddata.sql");
        } catch (IOException ioe) {
            ioe.printStackTrace();
            return; //???? used return just for brevity
        }
        File dbpath = new File(this.getDatabasePath("mydb").getParent());
        if (!dbpath.exists()) {
            dbpath.mkdirs();

            db = SQLiteDatabase.openOrCreateDatabase(this.getDatabasePath("mydb"), null);
            BufferedReader br = new BufferedReader(new InputStreamReader(schema));
            try {
                while ((lineofdata = br.readLine()) != null) {
                    Log.d("ACTIONSQL", "Actioning " + lineofdata);
                    db.execSQL(lineofdata);
                }
                schema.close();
            } catch (IOException ioe) {
                ioe.printStackTrace();
                try {
                    schema.close();
                } catch (IOException ioe2) {
                    ioe2.printStackTrace();
                }
            }
            db.close();
            db = SQLiteDatabase.openDatabase(this.getDatabasePath("mydb").getPath(),null, Context.MODE_PRIVATE);
            lineofdata = "";
            br = new BufferedReader(new InputStreamReader(seeddata));
            try {
                while ((lineofdata = br.readLine()) != null) {
                    Log.d("ACTIONSQL", "Actioning " + lineofdata);
                    db.execSQL(lineofdata);
                }
            } catch (IOException ioe) {
                ioe.printStackTrace();
                db.endTransaction();
            }
        }  else {
            db = SQLiteDatabase.openDatabase(this.getDatabasePath("mydb").getPath(),null,Context.MODE_PRIVATE);
        }

        csr = db.query("tablea",null,null,null,null,null,null);
        while (csr.moveToNext()) {
            Log.d("TABLEINFO","Row " + csr.getPosition());
            for(String s: csr.getColumnNames()) {
                Log.d("TABLEINFO","\tColumn=" + s + " Data=" + csr.getString(csr.getColumnIndex(s)));
            }
        }
        csr = db.query("tableb",null,null,null,null,null,null);
        while (csr.moveToNext()) {
            Log.d("TABLEINFO","Row " + csr.getPosition());
            for(String s: csr.getColumnNames()) {
                Log.d("TABLEINFO","\tColumn=" + s + " Data=" + csr.getString(csr.getColumnIndex(s)));
            }
        }
        csr = db.query("tablec",null,null,null,null,null,null);
        while (csr.moveToNext()) {
            Log.d("TABLEINFO","Row " + csr.getPosition());
            for(String s: csr.getColumnNames()) {
                Log.d("TABLEINFO","\tColumn=" + s + " Data=" + csr.getString(csr.getColumnIndex(s)));
            }
        }
    }
}

Result for initial run :-

11-24 19:20:02.182 4652-4652/? D/ACTIONSQL: Actioning CREATE TABLE tablea (_id INTEGER PRIMARY KEY, _name TEXT, _otherdata TEXT, _etc)
11-24 19:20:02.187 4652-4652/? D/ACTIONSQL: Actioning CREATE TABLE tableb (_id INTEGER PRIMARY KEY, _name TEXT, _otherdata TEXT, _etc)
11-24 19:20:02.191 4652-4652/? D/ACTIONSQL: Actioning CREATE TABLE tablec (_id INTEGER PRIMARY KEY, _name TEXT, _otherdata TEXT, _etc)
11-24 19:20:02.197 4652-4652/? D/ACTIONSQL: Actioning INSERT INTO tablea (_name,_otherdata, _etc) VALUES("Fred","Data for Fred","even more data for Fred.")
11-24 19:20:02.201 4652-4652/? D/ACTIONSQL: Actioning INSERT INTO tablea (_name,_otherdata, _etc) VALUES("Bert","Data for Bert","even more data for Bert.")
11-24 19:20:02.204 4652-4652/? D/ACTIONSQL: Actioning INSERT INTO tablea (_name,_otherdata, _etc) VALUES("Tom","Data for Tom","even more data for Tom.")
11-24 19:20:02.206 4652-4652/? D/ACTIONSQL: Actioning INSERT INTO tablea (_name,_otherdata, _etc) VALUES("Harry","Harry has this data.","Harry has even more data.")
11-24 19:20:02.209 4652-4652/? D/ACTIONSQL: Actioning INSERT INTO tableb (_name,_otherdata, _etc) VALUES("Fred","Data for Fred","even more data for Fred.")
11-24 19:20:02.213 4652-4652/? D/ACTIONSQL: Actioning INSERT INTO tableb (_name,_otherdata, _etc) VALUES("Bert","Data for Bert","even more data for Bert.")
11-24 19:20:02.216 4652-4652/? D/ACTIONSQL: Actioning INSERT INTO tableb (_name,_otherdata, _etc) VALUES("Tom","Data for Tom","even more data for Tom.")
11-24 19:20:02.219 4652-4652/? D/ACTIONSQL: Actioning INSERT INTO tableb (_name,_otherdata, _etc) VALUES("Harry","Harry has this data.","Harry has even more data.")
11-24 19:20:02.222 4652-4652/? D/ACTIONSQL: Actioning INSERT INTO tablec (_name,_otherdata, _etc) VALUES("Fred","Data for Fred","even more data for Fred.")
11-24 19:20:02.224 4652-4652/? D/ACTIONSQL: Actioning INSERT INTO tablec (_name,_otherdata, _etc) VALUES("Bert","Data for Bert","even more data for Bert.")
11-24 19:20:02.227 4652-4652/? D/ACTIONSQL: Actioning INSERT INTO tablec (_name,_otherdata, _etc) VALUES("Tom","Data for Tom","even more data for Tom.")
11-24 19:20:02.231 4652-4652/? D/ACTIONSQL: Actioning INSERT INTO tablec (_name,_otherdata, _etc) VALUES("Harry","Harry has this data.","Harry has even more data.")
11-24 19:20:02.235 4652-4652/? D/TABLEINFO: Row 0
11-24 19:20:02.235 4652-4652/? D/TABLEINFO:     Column=_id Data=1
11-24 19:20:02.235 4652-4652/? D/TABLEINFO:     Column=_name Data=Fred
11-24 19:20:02.235 4652-4652/? D/TABLEINFO:     Column=_otherdata Data=Data for Fred
11-24 19:20:02.235 4652-4652/? D/TABLEINFO:     Column=_etc Data=even more data for Fred.
11-24 19:20:02.235 4652-4652/? D/TABLEINFO: Row 1
11-24 19:20:02.235 4652-4652/? D/TABLEINFO:     Column=_id Data=2
11-24 19:20:02.235 4652-4652/? D/TABLEINFO:     Column=_name Data=Bert
11-24 19:20:02.235 4652-4652/? D/TABLEINFO:     Column=_otherdata Data=Data for Bert
11-24 19:20:02.235 4652-4652/? D/TABLEINFO:     Column=_etc Data=even more data for Bert.
11-24 19:20:02.235 4652-4652/? D/TABLEINFO: Row 2
11-24 19:20:02.235 4652-4652/? D/TABLEINFO:     Column=_id Data=3
11-24 19:20:02.235 4652-4652/? D/TABLEINFO:     Column=_name Data=Tom
11-24 19:20:02.235 4652-4652/? D/TABLEINFO:     Column=_otherdata Data=Data for Tom
11-24 19:20:02.235 4652-4652/? D/TABLEINFO:     Column=_etc Data=even more data for Tom.
11-24 19:20:02.235 4652-4652/? D/TABLEINFO: Row 3
11-24 19:20:02.235 4652-4652/? D/TABLEINFO:     Column=_id Data=4
11-24 19:20:02.235 4652-4652/? D/TABLEINFO:     Column=_name Data=Harry
11-24 19:20:02.235 4652-4652/? D/TABLEINFO:     Column=_otherdata Data=Harry has this data.
11-24 19:20:02.235 4652-4652/? D/TABLEINFO:     Column=_etc Data=Harry has even more data.
11-24 19:20:02.235 4652-4652/? D/TABLEINFO: Row 0
11-24 19:20:02.235 4652-4652/? D/TABLEINFO:     Column=_id Data=1
11-24 19:20:02.235 4652-4652/? D/TABLEINFO:     Column=_name Data=Fred
11-24 19:20:02.235 4652-4652/? D/TABLEINFO:     Column=_otherdata Data=Data for Fred
11-24 19:20:02.235 4652-4652/? D/TABLEINFO:     Column=_etc Data=even more data for Fred.
11-24 19:20:02.235 4652-4652/? D/TABLEINFO: Row 1
11-24 19:20:02.235 4652-4652/? D/TABLEINFO:     Column=_id Data=2
11-24 19:20:02.235 4652-4652/? D/TABLEINFO:     Column=_name Data=Bert
11-24 19:20:02.235 4652-4652/? D/TABLEINFO:     Column=_otherdata Data=Data for Bert
11-24 19:20:02.235 4652-4652/? D/TABLEINFO:     Column=_etc Data=even more data for Bert.
11-24 19:20:02.235 4652-4652/? D/TABLEINFO: Row 2
11-24 19:20:02.235 4652-4652/? D/TABLEINFO:     Column=_id Data=3
11-24 19:20:02.235 4652-4652/? D/TABLEINFO:     Column=_name Data=Tom
11-24 19:20:02.235 4652-4652/? D/TABLEINFO:     Column=_otherdata Data=Data for Tom
11-24 19:20:02.235 4652-4652/? D/TABLEINFO:     Column=_etc Data=even more data for Tom.
11-24 19:20:02.235 4652-4652/? D/TABLEINFO: Row 3
11-24 19:20:02.235 4652-4652/? D/TABLEINFO:     Column=_id Data=4
11-24 19:20:02.235 4652-4652/? D/TABLEINFO:     Column=_name Data=Harry
11-24 19:20:02.235 4652-4652/? D/TABLEINFO:     Column=_otherdata Data=Harry has this data.
11-24 19:20:02.235 4652-4652/? D/TABLEINFO:     Column=_etc Data=Harry has even more data.
11-24 19:20:02.235 4652-4652/? D/TABLEINFO: Row 0
11-24 19:20:02.236 4652-4652/? D/TABLEINFO:     Column=_id Data=1
11-24 19:20:02.236 4652-4652/? D/TABLEINFO:     Column=_name Data=Fred
11-24 19:20:02.236 4652-4652/? D/TABLEINFO:     Column=_otherdata Data=Data for Fred
11-24 19:20:02.236 4652-4652/? D/TABLEINFO:     Column=_etc Data=even more data for Fred.
11-24 19:20:02.236 4652-4652/? D/TABLEINFO: Row 1
11-24 19:20:02.236 4652-4652/? D/TABLEINFO:     Column=_id Data=2
11-24 19:20:02.236 4652-4652/? D/TABLEINFO:     Column=_name Data=Bert
11-24 19:20:02.236 4652-4652/? D/TABLEINFO:     Column=_otherdata Data=Data for Bert
11-24 19:20:02.236 4652-4652/? D/TABLEINFO:     Column=_etc Data=even more data for Bert.
11-24 19:20:02.236 4652-4652/? D/TABLEINFO: Row 2
11-24 19:20:02.236 4652-4652/? D/TABLEINFO:     Column=_id Data=3
11-24 19:20:02.236 4652-4652/? D/TABLEINFO:     Column=_name Data=Tom
11-24 19:20:02.236 4652-4652/? D/TABLEINFO:     Column=_otherdata Data=Data for Tom
11-24 19:20:02.236 4652-4652/? D/TABLEINFO:     Column=_etc Data=even more data for Tom.
11-24 19:20:02.236 4652-4652/? D/TABLEINFO: Row 3
11-24 19:20:02.236 4652-4652/? D/TABLEINFO:     Column=_id Data=4
11-24 19:20:02.236 4652-4652/? D/TABLEINFO:     Column=_name Data=Harry
11-24 19:20:02.236 4652-4652/? D/TABLEINFO:     Column=_otherdata Data=Harry has this data.
11-24 19:20:02.236 4652-4652/? D/TABLEINFO:     Column=_etc Data=Harry has even more data.

Result for subsequent run :-

11-24 19:20:20.605 4709-4709/mjt.importschemaanddata D/TABLEINFO: Row 0
11-24 19:20:20.606 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_id Data=1
11-24 19:20:20.606 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_name Data=Fred
11-24 19:20:20.606 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_otherdata Data=Data for Fred
11-24 19:20:20.606 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_etc Data=even more data for Fred.
11-24 19:20:20.606 4709-4709/mjt.importschemaanddata D/TABLEINFO: Row 1
11-24 19:20:20.606 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_id Data=2
11-24 19:20:20.606 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_name Data=Bert
11-24 19:20:20.606 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_otherdata Data=Data for Bert
11-24 19:20:20.606 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_etc Data=even more data for Bert.
11-24 19:20:20.606 4709-4709/mjt.importschemaanddata D/TABLEINFO: Row 2
11-24 19:20:20.606 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_id Data=3
11-24 19:20:20.606 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_name Data=Tom
11-24 19:20:20.606 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_otherdata Data=Data for Tom
11-24 19:20:20.606 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_etc Data=even more data for Tom.
11-24 19:20:20.606 4709-4709/mjt.importschemaanddata D/TABLEINFO: Row 3
11-24 19:20:20.606 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_id Data=4
11-24 19:20:20.606 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_name Data=Harry
11-24 19:20:20.606 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_otherdata Data=Harry has this data.
11-24 19:20:20.606 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_etc Data=Harry has even more data.
11-24 19:20:20.606 4709-4709/mjt.importschemaanddata D/TABLEINFO: Row 0
11-24 19:20:20.606 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_id Data=1
11-24 19:20:20.606 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_name Data=Fred
11-24 19:20:20.606 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_otherdata Data=Data for Fred
11-24 19:20:20.606 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_etc Data=even more data for Fred.
11-24 19:20:20.606 4709-4709/mjt.importschemaanddata D/TABLEINFO: Row 1
11-24 19:20:20.606 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_id Data=2
11-24 19:20:20.606 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_name Data=Bert
11-24 19:20:20.606 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_otherdata Data=Data for Bert
11-24 19:20:20.606 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_etc Data=even more data for Bert.
11-24 19:20:20.606 4709-4709/mjt.importschemaanddata D/TABLEINFO: Row 2
11-24 19:20:20.606 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_id Data=3
11-24 19:20:20.606 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_name Data=Tom
11-24 19:20:20.606 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_otherdata Data=Data for Tom
11-24 19:20:20.606 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_etc Data=even more data for Tom.
11-24 19:20:20.606 4709-4709/mjt.importschemaanddata D/TABLEINFO: Row 3
11-24 19:20:20.606 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_id Data=4
11-24 19:20:20.606 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_name Data=Harry
11-24 19:20:20.606 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_otherdata Data=Harry has this data.
11-24 19:20:20.606 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_etc Data=Harry has even more data.
11-24 19:20:20.606 4709-4709/mjt.importschemaanddata D/TABLEINFO: Row 0
11-24 19:20:20.606 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_id Data=1
11-24 19:20:20.606 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_name Data=Fred
11-24 19:20:20.606 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_otherdata Data=Data for Fred
11-24 19:20:20.606 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_etc Data=even more data for Fred.
11-24 19:20:20.607 4709-4709/mjt.importschemaanddata D/TABLEINFO: Row 1
11-24 19:20:20.607 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_id Data=2
11-24 19:20:20.607 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_name Data=Bert
11-24 19:20:20.607 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_otherdata Data=Data for Bert
11-24 19:20:20.607 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_etc Data=even more data for Bert.
11-24 19:20:20.607 4709-4709/mjt.importschemaanddata D/TABLEINFO: Row 2
11-24 19:20:20.607 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_id Data=3
11-24 19:20:20.607 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_name Data=Tom
11-24 19:20:20.607 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_otherdata Data=Data for Tom
11-24 19:20:20.607 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_etc Data=even more data for Tom.
11-24 19:20:20.607 4709-4709/mjt.importschemaanddata D/TABLEINFO: Row 3
11-24 19:20:20.607 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_id Data=4
11-24 19:20:20.607 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_name Data=Harry
11-24 19:20:20.607 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_otherdata Data=Harry has this data.
11-24 19:20:20.607 4709-4709/mjt.importschemaanddata D/TABLEINFO:   Column=_etc Data=Harry has even more data.
Sign up to request clarification or add additional context in comments.

5 Comments

I appreciate you, that was the perfect solution.Thanks
@MikeT is it possible to import .sql file to sqlite through android code?if yes how..
@GajuKollur that's what the answer shows (Complete Working Solution).
@MikeT but in solution there is a schema file ...but i have only .sql file ..i have to create a proper table by reading this file and insert data to my db by reading the same .sql file..
@GajuKollur 1 file 100 files, the same principle applies as long as the files contain valid SQL they can be called whatever. You simply adapt the code accordingly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.