<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Vertica Documentation – FROM clause</title>
    <link>/en/sql-reference/statements/select/from-clause/</link>
    <description>Recent content in FROM clause on Vertica Documentation</description>
    <generator>Hugo -- gohugo.io</generator>
    
	  <atom:link href="/en/sql-reference/statements/select/from-clause/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Sql-Reference: Joined-table</title>
      <link>/en/sql-reference/statements/select/from-clause/joined-table/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/select/from-clause/joined-table/</guid>
      <description>
        
        
        &lt;p&gt;Specifies how to join tables.&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;&lt;a href=&#34;../../../../../en/sql-reference/statements/select/from-clause/table-reference/&#34;&gt;table‑reference&lt;/a&gt;&lt;/span&gt; [&lt;span class=&#34;code-variable&#34;&gt;join-type&lt;/span&gt;] JOIN &lt;span class=&#34;code-variable&#34;&gt;table-reference&lt;/span&gt;[ TABLESAMPLE(&lt;span class=&#34;code-variable&#34;&gt;sampling‑pct&lt;/span&gt;) ] [ ON &lt;span class=&#34;code-variable&#34;&gt;&lt;a href=&#34;../../../../../en/sql-reference/language-elements/predicates/interpolate/join-predicate/&#34;&gt;join‑predicate&lt;/a&gt;&lt;/span&gt; ]
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;span class=&#34;code-variable&#34;&gt;[table‑reference](/en/sql-reference/statements/select/from-clause/table-reference/)&lt;/span&gt;&lt;/dt&gt;
&lt;dd&gt;A table or another &lt;em&gt;&lt;code&gt;joined-table&lt;/code&gt;&lt;/em&gt;.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;join-type&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;strong&gt;Valid Values:&lt;/strong&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../../../en/data-analysis/queries/joins/inner-joins/&#34;&gt;INNER&lt;/a&gt; (default). &lt;code&gt;INNER JOIN&lt;/code&gt; is equivalent to a query that specifies its join predicate in a &lt;code&gt;WHERE&lt;/code&gt; clause.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/data-analysis/queries/joins/outer-joins/LeftOuterJoin&#34;&gt;LEFT [ OUTER ]&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/data-analysis/queries/joins/outer-joins/RightOuterJoin&#34;&gt;RIGHT [ OUTER ]&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/data-analysis/queries/joins/outer-joins/FullOuterJoin&#34;&gt;FULL [ OUTER ]&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/data-analysis/queries/joins/inner-joins/natural-joins/&#34;&gt;NATURAL&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/data-analysis/queries/joins/inner-joins/cross-joins/&#34;&gt;CROSS&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;TABLESAMPLE&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Specifies to use simple random sampling to return an approximate percentage of records. All rows in the total potential return set are equally eligible to be included in the sampling. Vertica performs this sampling before other filters in the query are applied. The number of records returned is not guaranteed to be the exact percentage of records defined by &lt;em&gt;&lt;code&gt;sampling‑pct&lt;/code&gt;&lt;/em&gt;.
&lt;p&gt;The &lt;code&gt;TABLESAMPLE&lt;/code&gt; option is valid only with user-defined tables and Data Collector (DC) tables. Views and system tables are not supported.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;sampling‑pct&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Specifies the percentage of records to be returned as a part of sampling. The value must be greater than 0 and less than 100.&lt;/dd&gt;
&lt;dt&gt;
&lt;code&gt;ON &lt;span class=&#34;code-variable&#34;&gt;&lt;a href=&#34;../../../../../en/sql-reference/language-elements/predicates/interpolate/join-predicate/&#34;&gt;join‑predicate&lt;/a&gt;&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;An equi-join based on one or more columns in the joined tables. invalid for &lt;code&gt;NATURAL&lt;/code&gt; and &lt;code&gt;CROSS&lt;/code&gt; joins, required for all other join types.&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;&lt;a name=&#34;Alternat&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;alternative-join-syntax-options&#34;&gt;Alternative JOIN syntax options&lt;/h2&gt;
&lt;p&gt;Vertica supports two older join syntax conventions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Table joins specified by join predicate in a &lt;code&gt;WHERE&lt;/code&gt; clause&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Table joins specified by a &lt;code&gt;USING&lt;/code&gt; clause&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For details, see &lt;a href=&#34;../../../../../en/data-analysis/queries/joins/join-syntax/#AlternativeJoinSyntax&#34;&gt;Join Syntax&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following &lt;code&gt;SELECT&lt;/code&gt; statement qualifies its &lt;code&gt;JOIN&lt;/code&gt; clause with the &lt;code&gt;TABLESAMPLE&lt;/code&gt; option:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT user_id.id, user_name.name FROM user_name TABLESAMPLE(50)
     JOIN user_id TABLESAMPLE(50) ON user_name.id = user_id.id;
  id  |  name
------+--------
  489 | Markus
 2234 | Cato
  763 | Pompey
(3 rows)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: Table-reference</title>
      <link>/en/sql-reference/statements/select/from-clause/table-reference/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/statements/select/from-clause/table-reference/</guid>
      <description>
        
        
        &lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[[&lt;span class=&#34;code-variable&#34;&gt;database&lt;/span&gt;.]&lt;span class=&#34;code-variable&#34;&gt;schema.&lt;/span&gt;]&lt;span class=&#34;code-variable&#34;&gt;table&lt;/span&gt;[ [AS] &lt;span class=&#34;code-variable&#34;&gt;alias&lt;/span&gt;]
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;[&lt;/code&gt;&lt;em&gt;&lt;code&gt;database&lt;/code&gt;&lt;/em&gt;&lt;code&gt;.]&lt;/code&gt;&lt;em&gt;&lt;code&gt;schema&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Database and &lt;a href=&#34;../../../../../en/admin/configuring-db/designing-logical-schema/using-multiple-schemas/setting-search-paths/&#34;&gt;schema&lt;/a&gt;. The default schema is &lt;code&gt;public&lt;/code&gt;. If you specify a database, it must be the current database.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;table&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;A table in the logical schema.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;[AS] &lt;/code&gt;&lt;em&gt;&lt;code&gt;alias&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;A temporary name used for references to &lt;em&gt;&lt;code&gt;table&lt;/code&gt;&lt;/em&gt;.&lt;/dd&gt;
&lt;/dl&gt;

      </description>
    </item>
    
  </channel>
</rss>
