| Server IP : 121.121.20.254 / Your IP : 216.73.216.202 Web Server : Microsoft-IIS/10.0 System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64 User : IUSR ( 0) PHP Version : 8.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Program Files/LibreOffice/help/en-US/text/shared/guide/ |
Upload File : |
<!DOCTYPE html>
<html lang="en-US" dir="ltr">
<head>
<base href="../../../../">
<noscript><meta http-equiv="refresh" content="0; URL=../../../../en-US/noscript.html"></noscript>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Executing SQL Commands</title>
<link rel="shortcut icon" href="media/navigation/favicon.ico">
<link type="text/css" href="normalize.css" rel="Stylesheet">
<link type="text/css" href="prism.css" rel="Stylesheet">
<link type="text/css" href="default.css" rel="Stylesheet">
<script type="text/javascript" src="polyfills.js"></script><script type="text/javascript" src="languages.js"></script><script type="text/javascript" src="en-US/langnames.js"></script><script type="text/javascript" src="flexsearch.debug.js"></script><script type="text/javascript" src="prism.js"></script><script type="text/javascript" src="help2.js" defer></script><script type="text/javascript" src="a11y-toggle.js" defer></script><script type="text/javascript" src="paginathing.js" defer></script><script type="text/javascript" src="en-US/bookmarks.js" defer></script><script type="text/javascript" src="en-US/contents.js" defer></script><script type="text/javascript" src="help.js" defer></script><meta name="viewport" content="width=device-width,initial-scale=1">
</head>
<body>
<header id="TopLeftHeader"><a class="symbol" href="en-US/text/shared/05/new_help.html"><div></div></a><a class="logo" href="en-US/text/shared/05/new_help.html"><p dir="auto">LibreOffice 24.2 Help</p></a><div class="dropdowns"><div class="modules">
<button type="button" data-a11y-toggle="modules-nav" id="modules" aria-haspopup="true" aria-expanded="false" aria-controls="modules-nav">Module</button><nav id="modules-nav" hidden=""></nav>
</div></div></header><aside class="leftside"><input id="accordion-1" name="accordion-menu" type="checkbox"><label for="accordion-1" dir="auto">Contents</label><div id="Contents" class="contents-treeview"></div></aside><div id="SearchFrame"><div id="Bookmarks">
<input id="search-bar" type="search" class="search" placeholder="Search in bookmarks for all modules" dir="auto"><div class="nav-container" tabindex="0"><nav class="index" dir="auto"></nav></div>
</div></div>
<div id="DisplayArea" itemprop="softwareHelp" itemscope="true" itemtype="http://schema.org/SoftwareApplication">
<a name="bm_id3152801"></a><meta itemprop="keywords" content="SQL, executing SQL commands">
<meta itemprop="keywords" content="queries,creating in SQL view">
<meta itemprop="keywords" content="commands,SQL">
<meta itemprop="keywords" content="executing SQL commands">
<h1 id="hd_id3152801" dir="auto">
<a name="data_enter_sql"></a>Executing SQL Commands
</h1>
<p id="par_id3147008" class="paragraph" dir="auto">With the help of SQL commands you can control the database directly, and can also create and edit tables and queries.</p>
<div class="note">
<div class="noteicon" dir="auto"><img src="media/icon-themes/res/helpimg/note.svg" alt="Note Icon
" style="width:40px;height:40px;"></div>
<div class="notetext"><p dir="auto">Not all database types support all SQL instructions. If necessary, find out which SQL commands are supported by your database system.</p></div>
</div>
<br>
<h2 id="hd_id9577929" dir="auto">To execute an SQL statement directly</h2>
<ol itemprop="HowTo" itemscope="true" itemtype="http://schema.org/HowToSection" dir="auto">
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/HowToStep" dir="auto">
<p id="par_id7923825" class="paragraph" dir="auto">Choose <span class="emph">File - Open</span> to open a database file.</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/HowToStep" dir="auto">
<p id="par_id9448530" class="paragraph" dir="auto">Choose <span class="emph">Tools - SQL</span>.</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/HowToStep" dir="auto">
<p id="par_id3151176" class="paragraph" dir="auto">Click the <span class="emph">Create Query in SQL View</span> icon
<img src="media/icon-themes/cmd/sc_dbnewquerysql.svg" class="iconimage" alt="Icon" style="width:18px;height:18px" itemprop="icon" itemscope="true" itemtype="http://schema.org/ImageObject"> or</p>
<p id="par_id3145786" class="paragraph" dir="auto">Select an existing query from the list and click the <span class="emph">Edit</span> icon
<img src="media/icon-themes/cmd/sc_dbqueryedit.svg" class="iconimage" alt="Icon" style="width:21px;height:21px" itemprop="icon" itemscope="true" itemtype="http://schema.org/ImageObject">.</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/HowToStep" dir="auto">
<p id="par_id3083443" class="paragraph" dir="auto">In the <span class="emph">Query</span> window, choose <span class="emph">View - Switch Design View On/Off</span>. Edit the SQL command.</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/HowToStep" dir="auto">
<p id="par_id3152460" class="paragraph" dir="auto">Click the <span class="emph">Run</span> icon
<img src="media/icon-themes/cmd/sc_sbanativesql.svg" class="iconimage" alt="Icon" style="width:21px;height:21px" itemprop="icon" itemscope="true" itemtype="http://schema.org/ImageObject">. The result of the query is displayed in the upper window.</p>
</li>
<li itemprop="itemListElement" itemscope="true" itemtype="http://schema.org/HowToStep" dir="auto">
<p id="par_id3149298" class="paragraph" dir="auto">Click the <span class="emph">Save</span> or <span class="emph">Save As</span> icon
<img src="media/icon-themes/cmd/sc_save.svg" class="iconimage" alt="Icon" style="width:21px;height:21px" itemprop="icon" itemscope="true" itemtype="http://schema.org/ImageObject"> to save the query.</p>
</li>
</ol>
<a name="relatedtopics"></a><div class="relatedtopics">
<p class="related" itemprop="mentions" dir="auto"><a name="related"></a><span class="emph">Related Topics</span>
</p>
<div class="relatedbody" itemprop="mentions">
<p id="par_id3153223" class="paragraph" dir="auto"><a target="_top" href="en-US/text/sdatabase/02010100.html">Query Design</a></p>
<div class="embedded"><p class="embedded" dir="auto"><a target="_top" href="en-US/text/shared/guide/database_main.html">Database Overview</a>
</p></div>
</div>
</div>
</div>
<div id="DonationFrame"></div>
<footer><div id="DEBUG" class="debug">
<h3 class="bug">Help content debug info:</h3>
<p dir="auto">This page is: <a href="https://opengrok.libreoffice.org/xref/help/source/text/shared/guide/data_enter_sql.xhp" target="_blank">/text/shared/guide/data_enter_sql.xhp</a></p>
<p dir="auto">Title is: Executing SQL Commands</p>
<p id="bm_module" dir="auto"></p>
<p id="bm_system" dir="auto"></p>
<p id="bm_HID" dir="auto"></p>
</div></footer>
</body>
</html>