Sybase often uses SQL statements that accumulate in the work

Source: Internet
Author: User
Tags sybase sybase database import database

-------Create Sybase devices   statements---------disk initname= "Dev_db_client_dat26", physname= "F:\sybase_dev\DEV_DB_ Client_dat26.dat ", size=" 25600M " -------create Sybase log device   statement---------disk init name=" dev_db_ Client_log02 ", physname=" E:\sybase_dev\DEV_DB_CLIENT_LOG02.dat ", size=" 1024M " -------create Sybase database   Statement---------Create database onlinedbon dev_db_client_dat01=2048log on dev_db_client_ log01=1024 -------Import Database   statement---------load database onlinedb from  ' E:\onlineDB\ Onlinedb.dump '  -------query which users are currently accessing a database   statement---------Select spid,hostname,loggedindatetime, Ipaddr from master.dbo.sysprocesses where db_name (dbid) = ' Onlinedb '   ------- Query which users are currently accessing a database   statement---------select  ' kill  ' +convert (varchar,spid)  from  Master.dbo.sysprocesses where db_name (dbid) = ' onlinedb '  -------query all current processes   statements---------sq_who  -------Kill process   statement---------kill sid -------Database Login   Statement---------isql -u sa -p isql -u onlineuser -p  database -------Adding devices to the database, enabling expansion   statement---------Alter database onlinedb on dev_db_ client_dat23=25600     -------Set the number of devices in the database (default is 10)   statement---------sp_configure  " Number of devices ",30 -------provides many common statements---------http://www.doc88.com/p-302517539640.html --- ----View character encoding   statement---------Server side: Sp_helpsortselect id,name from syscharsets Client Side:select  @ @client_csnamehttp://bageer707.iteye.com/blog/152965     ---> Modify character set  ------- See what tables   statements are under a user---------select * from sysobjects -------Sybase database field type---------
Field type Describe Field length and its default value
char (size) String data used to hold the fixed length (size) byte. The length of each line is fixed (the insufficient part is blank), the maximum is 255 bytes, and the default value is 1 bytes per line.
varchar (size) Used to save variable-length string data. Where the maximum byte length is specified by (size). Each line is variable in length and has a maximum length of 255 bytes. Data length defaults to 1
NCHAR (size) Multibyte string. The length of each line is fixed (the insufficient part is blank). The length (size) refers to the number of characters, the maximum number of bytes is size*[email protected] @nchar size.
nvarchar (size) Variable-length, multibyte-string. Each line becomes longer. The length (size) refers to the number of characters, the maximum number of bytes is size*[email protected] @nchar size.
Binary (size) A fixed-length binary string. The length of each line is fixed (the insufficient part is blank), the maximum is 255 bytes, and the default value is 1 bytes per line.
varbinary (size) The length of a variable length binary string. Each line is variable in length and has a maximum length of 255 bytes. Data length defaults to 1
Timestamp Used to change the binary value of management. The number of bytes is 16
Datetime Saves fixed-length datetime data ranging from January 1, 1753 to December 21, 9999, with a precision of 3 microsecond intervals. Each row is fixed to a length of 8 bytes.
smalldatetime Saves the fixed-length datetime data, ranging from January 1, 1990 to June 6, 2079, with a precision of minute intervals. Each row is fixed to a length of 4 bytes.
Int Saves integer data, ranging from 2147483647 to +2147483647. The maximum length is 4 bytes 32-1 bytes or 4G.
smallint Save integer data, ranging from 32767 to +32767 The maximum length is 2 bytes 32-1 bytes or 4G.
tinyint Saves integer data, ranging from 0 to 255. The maximum length is 1 bytes.
Float Saves the floating-point data type, ranging from -2.23E-308 to +2.23E-308. The maximum length is 8 bytes.
Real Saves the floating-point data type, ranging from -1.18E-38 to +1.18E-38. The maximum length is 4 bytes.
Numeric (P,s) Save exact numeric data type, range -10E-38 to +10e-38,p is precision, total scale (1~38), S is decimal (decimal bit less than equals p) The maximum length is 2~17 bytes.
Decimal (P,s) Save exact numeric data type, range -10E-38 to +10e-38,p is precision, total scale (1~38), S is decimal (decimal bit less than equals p) The maximum length is 2~17 bytes.
Money Save currency Value data type, range from 922337203685477.5808 to +922337203685477.5808 The maximum length is 8 bytes.
SmallMoney Save currency Value data type, range from 214748.3647 to +214748.3647 The maximum length is 4 bytes.
Text Save a column larger than 255 bytes or text data that is larger than the 2KB page length. The maximum length is 2G.
Image Saves a column greater than 255 bytes or binary data that is larger than the 2KB page length. Maximum length

Sybase often uses SQL statements that accumulate in the work

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.