TheDeveloperBlog.com

Home | Contact Us

C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML

SQLite Detach Database

SQLite Detach Database with history, features, advantages, installation, commands, syntax, datatypes, operators, expressions, databases, table, crud operations, clauses, like, glob, limit, and clause, advance sqlite

<< Back to SQLITE

SQLite Detach Database

The SQLite DETACH DATABASE statement is used to detach the alias-named database from a database connection which was previously attached by using ATTACH statement.

If the same database file has been attached with multiple aliases, then DETACH command will disconnect only given name and rest of the attachment will still continue. Main and temp databases cannot be detached.

Note: The databases within the in-memory or temporary database, will be destroyed completely and content will be lost.

Syntax:

DETACH DATABASE 'Alias-Name'

Let's take an example to demonstrate how to detach an attached alias database. Here, we have a attached database "JavaTpoint".

SQLite Detach database 1

Detach 'JavaTpoint' from JTP.db:

DETACH DATABASE 'JavaTpoint'; 
SQLite Detach database 2

Database is detached now. You can see it by using ".databases" command.

SQLite Detach database 3




Related Links:


Related Links

Adjectives Ado Ai Android Angular Antonyms Apache Articles Asp Autocad Automata Aws Azure Basic Binary Bitcoin Blockchain C Cassandra Change Coa Computer Control Cpp Create Creating C-Sharp Cyber Daa Data Dbms Deletion Devops Difference Discrete Es6 Ethical Examples Features Firebase Flutter Fs Git Go Hbase History Hive Hiveql How Html Idioms Insertion Installing Ios Java Joomla Js Kafka Kali Laravel Logical Machine Matlab Matrix Mongodb Mysql One Opencv Oracle Ordering Os Pandas Php Pig Pl Postgresql Powershell Prepositions Program Python React Ruby Scala Selecting Selenium Sentence Seo Sharepoint Software Spellings Spotting Spring Sql Sqlite Sqoop Svn Swift Synonyms Talend Testng Types Uml Unity Vbnet Verbal Webdriver What Wpf