using …

Pure C#

‘Functions’ Kategorisi için Arşiv

SQL Server / T-SQL Tutorial

Yazan: esersahin 20/03/2009

http://www.java2s.com/Tutorial/SQLServer/CatalogSQLServer.htm

1. Query
1. 1. Query Select( 18 ) 1. 17. ANY( 6 )
1. 2. where( 10 ) 1. 18. Some( 2 )
1. 3. Order by( 16 ) 1. 19. AND( 2 )
1. 4. GROUP BY( 8 ) 1. 20. OR( 4 )
1. 5. Having( 7 ) 1. 21. Not( 6 )
1. 6. Null( 2 ) 1. 22. AS( 2 )
1. 7. IS NOT NULL( 1 ) 1. 23. Case( 19 )
1. 8. IS NULL( 3 ) 1. 24. arithmetic operator( 1 )
1. 9. Between( 8 ) 1. 25. Math Calculation( 4 )
1. 10. Exists( 6 ) 1. 26. Logical operator( 11 )
1. 11. In( 7 ) 1. 27. Comparison operators( 7 )
1. 12. DISTINCT( 7 ) 1. 28. Query Hints( 2 )
1. 13. LIKE( 16 ) 1. 29. Select Into( 6 )
1. 14. Column Alias( 5 ) 1. 30. TABLESAMPLE( 1 )
1. 15. Top( 10 ) 1. 31. ROWGUIDCOL( 1 )
1. 16. ALL( 8 ) 1. 32. rowversion( 1 )
2. Insert Delete Update
2. 1. Insert( 12 ) 2. 4. Delete( 9 )
2. 2. Insert into select( 5 ) 2. 5. Update( 16 )
2. 3. BULK INSERT( 1 ) 2. 6. Output( 1 )
3. Table
3. 1. Create Table( 6 ) 3. 5. DROP TABLE( 2 )
3. 2. ALTER TABLE( 16 ) 3. 6. Table alias( 5 )
3. 3. Column( 7 ) 3. 7. Temporary Table( 9 )
3. 4. Computed Columns( 1 ) 3. 8. TRUNCATE table( 2 )
4. Table Join
4. 1. Table Join( 14 ) 4. 7. Self join( 3 )
4. 2. Cross Join( 4 ) 4. 8. MERGE( 1 )
4. 3. Inner join( 8 ) 4. 9. One to many( 2 )
4. 4. Left Join( 1 ) 4. 10. many to many( 2 )
4. 5. LEFT OUTER JOIN( 5 ) 4. 11. APPLY( 1 )
4. 6. RIGHT OUTER JOIN( 2 )
5. Data Types
5. 1. bigint( 1 ) 5. 16. nchar( 1 )
5. 2. bit( 4 ) 5. 17. nVarChar( 2 )
5. 3. bitwise operators( 13 ) 5. 18. OPENROWSET( 2 )
5. 4. Char( 4 ) 5. 19. READTEXT( 1 )
5. 5. collate( 2 ) 5. 20. smalldatetime( 2 )
5. 6. Create Type( 5 ) 5. 21. Smallint( 1 )
5. 7. Data type( 1 ) 5. 22. SQL_VARIANT( 6 )
5. 8. Date Type( 1 ) 5. 23. text( 2 )
5. 9. datetime( 18 ) 5. 24. TEXTPTR( 1 )
5. 10. decimal( 4 ) 5. 25. timestamp( 2 )
5. 11. Float( 1 ) 5. 26. VARBINARY( 4 )
5. 12. FULLTEXT( 8 ) 5. 27. VARCHAR( 13 )
5. 13. integer( 9 ) 5. 28. WRITETEXT( 1 )
5. 14. Large Text( 3 ) 5. 29. Unicode( 1 )
5. 15. money( 1 )
6. Set Operations
6. 1. EXCEPT( 2 ) 6. 3. Union( 6 )
6. 2. INTERSECT( 2 )
7. Constraints
7. 1. Constraints( 5 ) 7. 7. Create Default( 2 )
7. 2. Primary Key( 7 ) 7. 8. Create Rule( 2 )
7. 3. Foreign Key( 9 ) 7. 9. NewID( 1 )
7. 4. REFERENCES( 5 ) 7. 10. Unique( 7 )
7. 5. Check( 13 ) 7. 11. uniqueidentifier( 1 )
7. 6. Default( 8 ) 7. 12. Constriant violation( 4 )
8. Subquery
8. 1. Subquery( 16 ) 8. 3. Inline view( 10 )
8. 2. Correlated subquery( 4 )
9. Aggregate Functions
9. 1. Aggregate function( 5 ) 9. 5. Min( 6 )
9. 2. AVG( 6 ) 9. 6. RANK( 3 )
9. 3. Count( 8 ) 9. 7. SUM( 6 )
9. 4. Max( 6 )
10. Date Functions
10. 1. CURRENT_TIMESTAMP( 4 ) 10. 8. DATEPART( 25 )
10. 2. Date calculation( 1 ) 10. 9. Day( 3 )
10. 3. DATEADD( 16 ) 10. 10. GETDATE( 7 )
10. 4. DATEDIFF( 16 ) 10. 11. GETUTCDATE( 1 )
10. 5. DATEFIRST( 3 ) 10. 12. ISDATE( 4 )
10. 6. DATEFORMAT( 1 ) 10. 13. MONTH( 2 )
10. 7. DATENAME( 15 ) 10. 14. Year( 2 )
11. Math Functions
11. 1. ABS( 2 ) 11. 13. LOG10( 1 )
11. 2. ACOS( 1 ) 11. 14. PI( 1 )
11. 3. ASIN( 1 ) 11. 15. Power( 2 )
11. 4. ATAN( 1 ) 11. 16. RADIANS( 1 )
11. 5. CEILING( 4 ) 11. 17. RAND( 4 )
11. 6. COS( 1 ) 11. 18. ROUND( 9 )
11. 7. COT( 1 ) 11. 19. SIGN( 1 )
11. 8. DEGREES( 1 ) 11. 20. Sin( 2 )
11. 9. EXP( 1 ) 11. 21. SQRT( 3 )
11. 10. FLOOR( 7 ) 11. 22. SQUARE( 2 )
11. 11. ISNUMERIC( 5 ) 11. 23. TAN( 1 )
11. 12. LOG( 1 )
12. String Functions
12. 1. ASCII( 3 ) 12. 13. REPLACE( 1 )
12. 2. Char function( 4 ) 12. 14. REPLICATE( 5 )
12. 3. CHARINDEX( 6 ) 12. 15. REVERSE( 2 )
12. 4. DIFFERENCE( 7 ) 12. 16. Right( 4 )
12. 5. FORMATMESSAGE( 1 ) 12. 17. RTRIM( 6 )
12. 6. LEFT( 7 ) 12. 18. SOUNDEX( 4 )
12. 7. LEN( 4 ) 12. 19. SPACE( 2 )
12. 8. LOWER( 4 ) 12. 20. STR( 6 )
12. 9. LTRIM( 4 ) 12. 21. STUFF( 3 )
12. 10. nchar function( 3 ) 12. 22. SUBSTRING( 8 )
12. 11. PATINDEX( 5 ) 12. 23. UNICODE function( 2 )
12. 12. QUOTENAME( 2 ) 12. 24. UPPER( 4 )
13. Data Convert Functions
13. 1. CAST( 7 ) 13. 4. DROP DATABASE( 2 )
13. 2. COALESCE( 5 ) 13. 5. ISNULL( 7 )
13. 3. CONVERT( 26 ) 13. 6. NULLIF( 1 )
14. Analytical Functions
14. 1. COMPUTE( 5 ) 14. 8. ROLLUP( 8 )
14. 2. CUBE( 7 ) 14. 9. ROW_NUMBER( 2 )
14. 3. DENSE_RANK( 1 ) 14. 10. STDEV( 3 )
14. 4. GROUPING( 4 ) 14. 11. STDEVP( 2 )
14. 5. NTILE( 1 ) 14. 12. VAR( 2 )
14. 6. PARTITION( 3 ) 14. 13. VARP( 1 )
14. 7. PIVOT( 1 )
15. Sequence Indentity
15. 1. Identity( 22 ) 15. 5. IDENT_INCR( 2 )
15. 2. IDENTITYCOL( 2 ) 15. 6. IDENT_SEED( 2 )
15. 3. IDENTITY_INSERT( 2 ) 15. 7. SCOPE_IDENTITY( 3 )
15. 4. IDENT_CURRENT( 2 )
16. View
16. 1. View( 8 ) 16. 5. DROP VIEW( 3 )
16. 2. Create View( 10 ) 16. 6. Filter view( 5 )
16. 3. Query view( 1 ) 16. 7. Updatable View( 6 )
16. 4. ALTER VIEW( 2 )
17. Index
17. 1. CREATE INDEX( 18 ) 17. 2. DROP INDEX( 2 )
18. Cursor
18. 1. Cursor( 3 ) 18. 5. FETCH_STATUS( 1 )
18. 2. Declare Cursor( 12 ) 18. 6. Close cursor( 1 )
18. 3. Open Cursor( 1 ) 18. 7. DEALLOCATE cursor( 2 )
18. 4. Fetch cursor( 3 ) 18. 8. cursor_status( 1 )
19. Database
19. 1. Create Database( 9 ) 19. 4. BACKUP( 3 )
19. 2. Use( 1 ) 19. 5. RESTORE DATABASE( 2 )
19. 3. Alter Database( 8 )
20. Transact SQL
20. 1. Declare( 7 ) 20. 14. Delete Statement( 5 )
20. 2. Variable( 15 ) 20. 15. Insert Statement( 5 )
20. 3. Variable Select( 8 ) 20. 16. Select statement( 4 )
20. 4. Set( 7 ) 20. 17. Update Statement( 2 )
20. 5. Table Variable( 5 ) 20. 18. Dynamic SQL( 8 )
20. 6. Print( 5 ) 20. 19. EXEC( 12 )
20. 7. IF( 14 ) 20. 20. Error Handler( 1 )
20. 8. while( 10 ) 20. 21. RAISERROR( 9 )
20. 9. Goto( 3 ) 20. 22. Return( 7 )
20. 10. Break( 1 ) 20. 23. Try catch( 7 )
20. 11. Comments( 2 ) 20. 24. WAITFOR( 4 )
20. 12. Continue( 1 ) 20. 25. With( 4 )
20. 13. Code Block( 2 )
21. Procedure Function
21. 1. Create function( 6 ) 21. 9. Procedure call( 2 )
21. 2. function( 19 ) 21. 10. Alter procedure( 4 )
21. 3. Recursive function( 5 ) 21. 11. Utility Procedure( 5 )
21. 4. Alter function( 1 ) 21. 12. Drop procedure( 2 )
21. 5. Drop function( 2 ) 21. 13. Parameter( 20 )
21. 6. Utility function( 6 ) 21. 14. Output parameter( 3 )
21. 7. Create Procedure( 6 ) 21. 15. Returning value( 4 )
21. 8. Procedure( 10 )
22. Trigger
22. 1. Trigger( 14 ) 22. 10. Trigger order( 2 )
22. 2. Alter Trigger( 4 ) 22. 11. Drop trigger( 2 )
22. 3. Trigger for after( 4 ) 22. 12. COLUMNS_UPDATED( 1 )
22. 4. Trigger for Delete( 4 ) 22. 13. Update function( 3 )
22. 5. Trigger for insert( 1 ) 22. 14. Deleted table( 2 )
22. 6. Trigger for update( 4 ) 22. 15. Inserted table( 5 )
22. 7. Trigger on database( 2 ) 22. 16. RECURSIVE_TRIGGERS( 1 )
22. 8. Trigger on server( 1 ) 22. 17. Utility trigger( 4 )
22. 9. Trigger on view( 3 )
23. Transaction
23. 1. TRANSACTION( 14 ) 23. 4. Save points( 2 )
23. 2. TRANSACTION ISOLATION LEVEL( 3 ) 23. 5. TRANCOUNT( 2 )
23. 3. COMMIT( 1 )
24. XML
24. 1. XML( 7 ) 24. 4. XML query( 5 )
24. 2. For XML( 4 ) 24. 5. XML Schema( 1 )
24. 3. XML Index( 1 )
25. System Functions
25. 1. APP_NAME( 1 ) 25. 31. sp_depends( 1 )
25. 2. COL_LENGTH( 2 ) 25. 32. sp_describe_cursor( 1 )
25. 3. COL_NAME( 1 ) 25. 33. sp_dropdevice( 1 )
25. 4. context_info( 1 ) 25. 34. sp_DropLogin( 1 )
25. 5. DATABASEPROPERTY( 1 ) 25. 35. sp_dropmessage( 1 )
25. 6. DATABASEPROPERTYEX( 1 ) 25. 36. sp_DropRoleMember( 3 )
25. 7. DATALENGTH( 4 ) 25. 37. sp_DropSrvRoleMember( 2 )
25. 8. db_name( 2 ) 25. 38. sp_droptype( 1 )
25. 9. DecryptByPassphrase( 1 ) 25. 39. sp_GrantDbAccess( 2 )
25. 10. EncryptByPassPhrase( 1 ) 25. 40. sp_GrantLogin( 1 )
25. 11. fn_builtin_permissions( 1 ) 25. 41. sp_help( 3 )
25. 12. fn_helpcollations( 1 ) 25. 42. sp_helpconstraint( 2 )
25. 13. fn_varbintohexstr( 1 ) 25. 43. sp_helpdb( 2 )
25. 14. fn_varbintohexsubstring( 1 ) 25. 44. sp_helpindex( 1 )
25. 15. fn_virtualfilestats( 1 ) 25. 45. sp_HelpRole( 2 )
25. 16. sp_addlinkedserver( 1 ) 25. 46. sp_helptext( 4 )
25. 17. sp_addlogin( 2 ) 25. 47. sp_helpuser( 1 )
25. 18. sp_addmessage( 3 ) 25. 48. sp_makestartup( 1 )
25. 19. sp_AddRole( 2 ) 25. 49. sp_monitor( 1 )
25. 20. sp_addrolemember( 5 ) 25. 50. sp_procoption( 1 )
25. 21. sp_AddSrvRoleMember( 2 ) 25. 51. sp_recompile( 2 )
25. 22. sp_addtype( 3 ) 25. 52. sp_refreshview( 1 )
25. 23. sp_altermessage( 1 ) 25. 53. sp_rename( 2 )
25. 24. sp_bindefault( 2 ) 25. 54. sp_RevokeDbAccess( 2 )
25. 25. sp_bindrule( 1 ) 25. 55. sp_serveroption( 1 )
25. 26. sp_change_users_login( 1 ) 25. 56. sp_spaceused( 2 )
25. 27. sp_configure( 4 ) 25. 57. sp_unbindefault( 1 )
25. 28. sp_create_removable( 1 ) 25. 58. sp_unmakestartup( 1 )
25. 29. sp_dboption( 9 ) 25. 59. SYSTEM_USER( 3 )
25. 30. sp_DenyLogin( 1 )
26. System Settings
26. 1. ANSI_NULLS( 1 ) 26. 24. PACK_RECEIVED( 1 )
26. 2. CONNECTIONS( 1 ) 26. 25. PACK_SENT( 1 )
26. 3. CPU_BUSY( 1 ) 26. 26. QUOTED_IDENTIFIER( 1 )
26. 4. DBCC( 10 ) 26. 27. rowcount( 7 )
26. 5. DB_ID( 1 ) 26. 28. ROWCOUNT_BIG( 1 )
26. 6. ERROR( 11 ) 26. 29. SERVERNAME( 1 )
26. 7. ERROR_NUMBER( 1 ) 26. 30. SERVERPROPERTY( 2 )
26. 8. ERROR_SEVERITY( 1 ) 26. 31. SERVICENAME( 1 )
26. 9. FORCEPLAN( 1 ) 26. 32. SESSIONPROPERTY( 7 )
26. 10. HashBytes( 1 ) 26. 33. SESSION_USER( 1 )
26. 11. HOST_ID( 1 ) 26. 34. SHOWPLAN_TEXT( 2 )
26. 12. HOST_NAME( 1 ) 26. 35. SPID( 1 )
26. 13. IDLE( 1 ) 26. 36. SUSER_ID( 1 )
26. 14. Information_schema( 10 ) 26. 37. SUSER_NAME( 1 )
26. 15. IO_BUSY( 1 ) 26. 38. TIMETICKS( 1 )
26. 16. LANGID( 1 ) 26. 39. TOTAL_ERRORS( 1 )
26. 17. LOCK_TIMEOUT( 2 ) 26. 40. TOTAL_READ( 1 )
26. 18. NESTLEVEL( 1 ) 26. 41. TOTAL_WRITE( 1 )
26. 19. NOCOUNT( 1 ) 26. 42. VERSION( 2 )
26. 20. OBJECTPROPERTY( 4 ) 26. 43. XACT_ABORT( 3 )
26. 21. OBJECT_ID( 5 ) 26. 44. xp_cmdshell( 2 )
26. 22. OBJECT_NAME( 1 ) 26. 45. xp_msver( 2 )
26. 23. PACKET_ERRORS( 1 ) 26. 46. xp_sendmail( 1 )
27. System Tables Views
27. 1. sys.columns( 1 ) 27. 19. sys.triggers( 3 )
27. 2. sys.databases( 3 ) 27. 20. sys.types( 1 )
27. 3. sys.database_principals( 2 ) 27. 21. sys.views( 3 )
27. 4. sys.fn_varbintohexstr( 1 ) 27. 22. sys.xml_schema_collections( 1 )
27. 5. sys.fulltext_catalogs( 1 ) 27. 23. sys.xml_schema_namespaces( 1 )
27. 6. sys.fulltext_indexes( 1 ) 27. 24. syscolumns( 2 )
27. 7. sys.fulltext_index_columns( 1 ) 27. 25. syscomments( 3 )
27. 8. sys.indexes( 1 ) 27. 26. sysconstraints( 2 )
27. 9. sys.messages( 1 ) 27. 27. sysdatabases( 2 )
27. 10. sys.objects( 4 ) 27. 28. sysdepends( 2 )
27. 11. sys.schemas( 3 ) 27. 29. sysfiles( 1 )
27. 12. sys.server_principals( 1 ) 27. 30. sysindexes( 3 )
27. 13. sys.server_sql_modules( 1 ) 27. 31. syslogins( 1 )
27. 14. sys.server_triggers( 1 ) 27. 32. sysmessages( 1 )
27. 15. sys.sql_dependencies( 1 ) 27. 33. sysobjects( 5 )
27. 16. sys.sql_modules( 2 ) 27. 34. systypes ( 1 )
27. 17. sys.syscacheobjects( 1 ) 27. 35. SYSUSERS( 2 )
27. 18. sys.syslogins( 1 )
28. User Role
28. 1. CREATE CERTIFICATE( 2 ) 28. 8. REVOKE( 6 )
28. 2. CREATE SCHEMA( 1 ) 28. 9. Role( 11 )
28. 3. CURRENT_USER( 1 ) 28. 10. schema( 3 )
28. 4. ALTER AUTHORIZATION( 1 ) 28. 11. USER( 8 )
28. 5. DENY( 2 ) 28. 12. USER_ID( 1 )
28. 6. GRANT( 14 ) 28. 13. USER_NAME( 1 )
28. 7. LOGIN( 13 )
29. CLR
29. 1. ASSEMBLY( 4 ) 29. 2. CLR( 6 )

Yazı kategorisi: CTE, Cast, Common Table Expressions, Cross-Tabs, Functions, Instead Of, Pivot Tables, ROW_NUMBER, Raiserror, SQL, SQLCLR, Sql Server, Sql Server Error, Sql Server Join, Stored Procedure, Transact-SQL, Trigger, UNION, UNION ALL, Update with Join | » yorum bırak;

SQL Server / T-SQL

Yazan: esersahin 20/03/2009

http://www.java2s.com/Code/SQLServer/CatalogSQLServer.htm

Select Query Subquery Insert Delete Update Data Set
Select Query
ALL( 1 ) AND( 1 ) ANY( 1 ) AS( 3 ) Between AND( 5 ) Bitwise Operator( 1 )
Case( 9 ) Column Alias( 4 ) Compare Date( 2 ) Data Type( 1 ) Date Calculation( 1 ) Date Compare( 1 )
DESC( 1 ) DISTINCT( 3 ) EXISTS( 5 ) Group BY( 9 ) HAVING( 6 ) IN( 6 )
IS NULL( 2 ) ISNULL( 6 ) LIKE( 10 ) Logical Operator( 7 ) Math Operator( 2 ) MAXRECURSION( 1 )
NOT( 4 ) NULL( 3 ) Operator Precedence( 2 ) OR( 2 ) Order Columns( 5 ) Order( 11 )
Query Batch( 1 ) Query Columns( 6 ) Quotation Mark( 1 ) Select Into( 3 ) Select( 13 ) String Compare( 1 )
Top percent( 4 ) Top With Ties( 1 ) Top( 7 ) Where( 9 ) With( 2 )
Subquery
Correlated subquery( 6 ) Nested Subquery( 2 ) RTRIM( 4 ) Subqueries ALL( 1 ) Subqueries ANY( 2 ) Subqueries Exists( 4 )
Subqueries IN( 5 ) Subqueries( 4 ) Subquery Aggregate Functions( 2 ) Subquery From( 1 )
Insert Delete Update
Batch Insert( 2 ) BULK INSERT( 1 ) Delete( 6 ) Insert Image( 1 ) Insert Select( 4 ) Insert( 5 )
Update( 15 )
Data Set
EXCEPT( 1 ) INTERSECT( 1 ) UNION ALL( 1 ) Union( 3 )
Store Procedure Function Transact SQL Trigger
Store Procedure Function
Create Function( 5 ) Create Procedure( 13 ) Default Parameter( 3 ) Drop Procedure( 1 ) EXEC( 6 ) EXECUTE( 2 )
Function Call( 2 ) Function Parameters( 1 ) Function Return( 7 ) Procedure Call( 3 ) Procedure Parameters( 2 ) Recursive function( 1 )
Scalar Functions( 1 )
Transact SQL
Assign Value( 4 ) ATAN( 1 ) Break( 2 ) COALESCE( 1 ) Code Block( 2 ) Continue( 2 )
Declare Variables( 5 ) Delete Data( 1 ) Dynamic SQL( 4 ) Error( 4 ) GOTO( 1 ) Handle Error( 1 )
If( 7 ) Insert Data( 6 ) LOG( 2 ) Object Property( 1 ) Print( 1 ) Query Data( 2 )
RAISERROR( 2 ) Return( 2 ) RowCount( 3 ) schemas( 1 ) Select Data( 1 ) Select Variables( 2 )
Set Variables( 4 ) Statement( 1 ) Table Variable( 5 ) Update Data( 5 ) Variable Scope( 2 ) Variables( 1 )
Version( 1 ) WAITFOR( 2 ) While( 5 )
Trigger
Alter Trigger( 1 ) Create Trigger( 3 ) Disable Trigger( 1 ) Enable Disable Trigger( 1 ) inserted table( 1 ) INSTEAD OF Trigger( 3 )
Trigger after( 2 ) Trigger for Insert( 1 ) Trigger for update( 4 ) Trigger Value( 2 ) UPDATE function( 1 )
Table Table Joins View Index Database
Table
Add Column( 3 ) Alter Table( 2 ) Column Data Type( 1 ) Column Index( 1 ) Computed Column( 2 ) Copy Data( 1 )
Create Table( 1 ) Derived Columns( 1 ) Drop Column( 2 ) Drop Table( 3 ) Rename Column( 1 ) Rename Table( 1 )
Sub query( 2 ) Table Alias( 1 ) Table Copy( 1 ) Table Existence( 1 ) Table Properties( 1 ) Temporary Table( 3 )
TRUNCATE TABLE( 2 )
Table Joins
ANSI Join Syntax( 3 ) Cross Join( 3 ) INNER JOIN( 4 ) Left Join( 2 ) LEFT OUTER JOIN( 1 ) RIGHT JOIN( 1 )
RIGHT OUTER JOIN( 2 ) Self Join( 1 ) SQL Server Join Syntax( 2 ) Table Join( 10 )
View
Alter View( 2 ) Create View( 13 ) Drop View( 2 ) ENCRYPTION( 1 ) Filter view( 2 ) Inline view( 2 )
Nested View( 1 ) Query View( 1 ) SCHEMABINDING( 1 ) Updatable View( 2 ) View Existance( 1 )
Index
CLUSTERED INDEX( 2 ) Create Index( 6 ) Drop Index( 1 ) DROP_EXISTING( 1 )
Database
Create Database( 3 ) Database Info( 1 ) Database Option( 7 ) databases( 2 ) DROP DATABASE( 2 ) USE( 1 )
Transaction Cursor Constraints Sequence
Transaction
Commit Transaction( 3 ) Transaction Roll back( 4 ) XACT_ABORT( 1 )
Cursor
Declare CURSOR( 3 ) Fetch Data( 2 ) Fetch_Status( 1 ) Open cursor( 2 )
Constraints
Add Primary Key( 2 ) CASCADE( 1 ) Check Options( 6 ) Check value range( 3 ) Column Constraints( 5 ) Constraints Basics( 2 )
CREATE RULE( 1 ) Default Value( 3 ) Disable constraint( 1 ) Foreign Key( 4 ) Maintain Constaints( 1 ) Nullable( 3 )
Primary key( 3 ) Unique( 3 ) UniqueIdentifier( 1 )
Sequence
IDENTITY( 12 ) IDENTITYCOL( 1 ) IDENT_CURRENT( 2 ) NEWID( 1 ) Procedure Call( 3 ) Procedure Existance( 1 )
Procedure Permission( 1 ) Procedure with Parameters( 13 ) Procedure( 1 )
Data Type XML Date Timezone
Data Type
Bit( 2 ) Cast( 21 ) char( 1 ) Convert( 8 ) Data Type Convert( 1 ) datetime( 1 )
decimal( 7 ) float( 1 ) int( 3 ) Money( 1 ) nchar Data Type( 1 ) Number Format( 2 )
text( 1 ) varchar( 3 )
XML
XML column( 2 )
Date Timezone
CURRENT_TIMESTAMP( 1 ) Date Data Type( 2 ) Date Format( 12 ) DATEADD( 18 ) DATEDIFF( 19 ) DATENAME( 14 )
DATEPART( 13 ) Datetime( 3 ) Day( 4 ) GetDate( 4 ) GETUTCDATE( 2 ) Int( 1 )
ISDATE( 6 ) Month( 4 ) Year( 4 )
Aggregate Functions Analytical Functions Math Functions String Functions
Aggregate Functions
Aggregate Function Basics( 2 ) AVG( 4 ) Count( 6 ) COUNT_BIG( 2 ) MAX( 3 ) MIN( 2 )
SUM( 2 )
Analytical Functions
COMPUTE( 5 ) Cube( 2 ) DENSE RANK( 2 ) NTile( 1 ) Over( 1 ) RANK( 2 )
Row Number( 3 ) STDEV( 4 ) VAR( 3 ) VARP( 2 ) WITH ROLLUP( 2 )
Math Functions
ABS( 2 ) ACOS( 2 ) ASIN( 1 ) CEILING( 3 ) COS( 2 ) COT( 1 )
DEGREES( 2 ) EXP( 1 ) FLOOR( 3 ) ISNUMERIC( 3 ) Log10( 2 ) mod( 1 )
PI( 1 ) Power( 2 ) RADIANS( 1 ) RAND( 1 ) ROUND( 9 ) SIGN( 1 )
SIN( 1 ) SQRT( 1 ) SQUARE( 1 ) TAN( 1 )
String Functions
ASCII( 2 ) CHAR( 3 ) CHARINDEX( 5 ) COLLATE( 1 ) DATALENGTH( 3 ) Difference( 4 )
Escape( 1 ) LEFT( 4 ) LEN( 4 ) Lower( 2 ) LTRIM( 2 ) NCHAR( 2 )
PATINDEX( 2 ) QUOTENAME( 1 ) Regular Expressions( 5 ) REPLACE( 3 ) REPLICATE( 4 ) REVERSE( 2 )
RIGHT( 4 ) SOUNDEX( 2 ) Space( 2 ) STR( 6 ) STUFF( 2 ) Substring( 4 )
UNICODE( 1 ) UPPER( 3 )
System
System
columns( 2 ) DATABASEPROPERTYEX( 1 ) DB_ID( 1 ) Error_Message( 1 ) HOST_NAME( 1 ) INFORMATION_SCHEMA( 3 )
LOCK_TIMEOUT( 1 ) LOGIN( 1 ) OBJECT_ID( 1 ) QUOTED_IDENTIFIER( 2 ) Row Count( 2 ) ROWCOUNT( 1 )
SHOWPLAN_TEXT( 2 ) sp_addmessage( 2 ) sp_altermessage( 1 ) sp_dboption( 1 ) sp_dropmessage( 1 ) sp_helpconstraint( 1 )
sp_helpindex( 1 ) sp_helptext( 1 ) sp_unbindefault( 1 ) STATISTICS( 1 ) SUSER_SNAME( 1 ) sys.sql_modules( 1 )
sys.syscacheobjects( 1 ) sys.types( 1 ) sys.views( 1 ) sys.XML_schema_collections( 1 ) syscomments( 1 ) sysdepends( 1 )
sysmessages( 2 ) sysobjects( 2 ) sysusers( 1 ) TOTAL_ERRORS( 1 ) TOTAL_READ( 1 ) USER( 1 )
USER_NAME( 1 ) views( 1 )

Yazı kategorisi: CTE, Cast, Cross-Tabs, Functions, Pivot Tables, SQL, Sql Server, Sql Server Error, Sql Server Join, Stored Procedure, Transact-SQL, Trigger | » yorum bırak;

Functions (Transact-SQL)

Yazan: esersahin 17/03/2009

http://msdn.microsoft.com/en-us/library/ms174318(SQL.90).aspx

SQL Server 2005 provides many built-in functions and also lets you create user-defined functions. The categories of built-in functions are listed on this page. For more information about user-defined functions, see User-defined Functions (Database Engine).

Function Description
Rowset Functions Return an object that can be used like table references in an SQL statement.
Aggregate Functions Operate on a collection of values but return a single, summarizing value.
Ranking Functions Return a ranking value for each row in a partition.
Scalar functions Operate on a single value and then return a single value. Scalar functions can be used wherever an expression is valid.

Function category Description
Configuration Functions Return information about the current configuration.
Cursor Functions Return information about cursors.
Date and Time Functions Perform operations on a date and time input values and return string, numeric, or date and time values.
Mathematical Functions Perform calculations based on input values provided as parameters to the functions, and return numeric values.
Metadata Functions Return information about the database and database objects.
Security Functions Return information about users and roles.
String Functions Perform operations on a string (char or varchar) input value and return a string or numeric value.
System Functions Perform operations and return information about values, objects, and settings in an instance of SQL Server.
System Statistical Functions Return statistical information about the system.
Text and Image Functions Perform operations on text or image input values or columns, and return information about the value.
SQL Server built-in functions are either deterministic or nondeterministic. Functions are deterministic when they always return the same result any time they are called by using a specific set of input values. Functions are nondeterministic when they could return different results every time they are called, even with the same specific set of input values. For more information, see Deterministic and Nondeterministic Functions
Functions that take a character string input and return a character string output use the collation of the input string for the output.

Functions that take noncharacter inputs and return a character string use the default collation of the current database for the output.

Functions that take multiple character string inputs and return a character string use the rules of collation precedence to set the collation of the output string. For more information, see Collation Precedence (Transact-SQL).

Yazı kategorisi: Functions, Transact-SQL | » yorum bırak;