SQL Commands explained: The SQL SELECT Statement (the most commonly used SQL command) selects data from a database, specifying column(s) headings, table(s) from which columns are to be selected, and the criteria for selection.SELECT * is used to select all columns from a table.the criteria is if the first name starts with J:'Note that in the WHERE clause of SQL statement, percent (%) is used as a wild character instead of an asterisk (*), indicating zero or more characters after J. The ACE Provider can be used for both the Access & .accdb files. The first argument in the Open Schema Method which is a must, is the type of schema required which is a Schema Enum value (ie.In the WHERE clause of SQL statement, use underscore (_) to indicate a single character.'To use ADO in your VBA project, you must add a reference to the ADO Object Library in Excel (your host application) by clicking Tools-References in VBE, and then choose an appropriate version of Microsoft Active X Data Objects x.x Library from the list.'For pre - MS Access 2007, files (viz. For Access 2007 (.accdb database) use the ACE Provider: "Microsoft. Set ado Rec Set = Nothing Set conn DB = Nothing End Sub Use the Open Schema Method to access information about database tables and columns The Open Schema Method returns a Recordset object containing schema (structure) information about the database, like the tables and columns in the database and the supported data types. an enumerated value) which specifies the type of Recordset returned by the method. Close Set ado Rec Set = Nothing Set conn DB = Nothing End Sub Create a database table using ADO, with SQL statements Note that ADO does not by itself support creating database tables, which is actually done with ADOX.
A Database Management System (DBMS) is a program which manages data in databases, the manner in which data is created, stored, modified and accessed.
DML statements are used to managing and manipulating data within the database structure and deal with inserting, updating, deleteing and retrieving database information like records in tables.
Examples of often used DML commands are include INSERT, SELECT, UPDATE and DELETE.
The FROM clause in a SELECT statement specifies the Table from which columns are to be selected.
The WHERE clause in a SELECT statement specifies the criteria for selection. Use the INSERT command to insert a new row/record at the end of a table.