How to Create Database in Lisp Coding

The "create database <name>" syntax is a command passed to a Structured Query Language, or SQL, database from an application. This command is used to generate a new database, providing the connected account has sufficient authorization to create new databases on the system. You can send a "create database" command to an SQL database from a Lisp application through the Common Lisp SQL interface.

Instructions

    • 1

      Open the "Start" menu and type "Common Lisp Environment." Press "Enter" to load the application on your screen.

    • 2

      Establish a new connection to the database server from Lisp. Type: (connect ("<ipaddress>" "<user>" "<password>") :database-type :<type>)" and press "Enter." Replace "<ipaddress>" with the network address or hostname of the server running the database. Replace "<user>" with your user name on the database, then "<password>" with your database password. Change "<type>" to the type of database in all lowercase, such as "mysql," or "oracle" or "microsoftsql."

    • 3

      Create a new database by sending a command string to the SQL server:

      (query "create datbase <name>")

      (query "create database <name>")

      Replace "<name>" with the name of the database you would like to create.

    • 4

      Save and exit the Lisp editor. You do not need to compile a program as all Lisp code is executed as written. Press "Ctrl"+"S" to save the file. Press the "X" button at the top right corner to close the application.

Related Searches:

References

Comments

You May Also Like

Related Ads

Featured