Seagate ST43401N/ND Technické informace Strana 69

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 172
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 68
Migrating to Sybase Adaptive Server Enterprise 11.5 5-15
Adaptive Server Enterprise 11.5 If Your Current Version is 4.x
select columns from table1 t1, table1 t2
where clause ...
When used, correlation names must be used throughout the query.
For example, the following query is now invalid
select title_id from titles t
where titles.type = trad_cook
It must be rewritten as:
select title_id from titles t
where t.type = trad_cook
Mixing correlation names within subqueries, though not an error,
may bring different results:
select * from
my_table
where columnA =
select min(columnB) from
my_table
m where
my_table
.columnC = 10)
Note
You should use explicit correlation names throughout your syntax. This
makes your applications easier to maintain. If you use explicit correlation
names in the from clause, use the same names in the select list and where
clause.
select into and NULL Column Headings
SQL Server 4.x allowed null column headings in tables created using
the
select into command. This can make SQL code and result sets
difficult to read, and is not allowed under ANSI.
Versions 10 and 11 now require column headings to be valid SQL
identifiers.
Examples of select list items requiring column headings are:
Aggregate functions such as
avg(advance)
Arithmetic expressions such as column_name * 2
String concatenation such as au_lname +, + au_fname
Built-in functions such as
substring(au_lname,1,5)
Constants such as results
Here are some syntax examples that specify column headings:
Zobrazit stránku 68
1 2 ... 64 65 66 67 68 69 70 71 72 73 74 ... 171 172

Komentáře k této Příručce

Žádné komentáře