How to describe the basic information of a data table ?, Description Basic Information
Recently, I have worked with a colleague to design database tables. After designing each table, we need to record the basic information of the table and send it to colleagues in the same project team for reference and review. At the
Tags: Table structure mysql5.7 basic statementsObjectiveNo more nonsense, just go straight on.1. View the table structure Basic statement describeThe DESCRIBE/DESC statement can view table field information, including: Lot Name, field data type, whether it is a primary key, whether there are default values, and so on.
[SQL] View PlainCopy
1, quite with the MySQL show databases;
[SQL] View PlainCopy
Select Datname from pg_database;
[SQL] View PlainCopy
2, equivalent to the MySQL show tables;
[SQL] View PlainCopy
SELECT table_name from information_schema.tables WHERE table_schema = ' public ';
Public is the name of the default schema[SQL] View PlainCopy
3, quite with the MySQL describe table_name;
Q: How does SQL server access the table of the sybase database?
A: The specific method is as follows:
1: Install the Sybase Client
Version requirements:
Sybase client 11.9.2 for NT
1.1: After the installation is complete, start running->Program-> Sybase-> dsedit
Tags: UI data encounters database excellent weight cas post--Li Wu:Heng Learn to think together, honouring teachers save Thanksgiving. Leaf See root three return to one, rivers the same oneness.Meekness Conscience Lord, willing to do without regrets to the most bitter. Reading exercises to keep the body and mind, sincere advice and the line and cherish.
Data,
data, Lingen on the data. You must be cautious about operating the database. Give the most bitter code here, and take a look at
Users table:Order Form:Now in the Orders table, the creator and the update person are the primary key userid that corresponds to the users table, and when you query the order, you want to display the user name1. First give your usual wordingSelect O.orderid,IsNull ((select top 1 UserName from Users where userid=o.createpeople), Createpeople,--CreatorIsNull ((select top 1 UserName from Users where userid=o.u
; new linked server
3.1: In the regular label column
Name Sybase,
Server type Choose another data source, select in the name of the provider
Microsoft OLE DB Provider for ODBC
Data source: Fill in the DSN name 1.70
3.2: Security column
Local Login Fill SA
Remote users and remote passwords fill in Sybase username and password
3.3: Use this security context to establish a connection
R
Because the database SQL statement in the major products with "dialect", that is, SQL Server Sybase are using T-SQL, MySQL is using standard SQL, Oracle has its own PL/SQL. Due to the differences in dialects, many SQL statements are difficult to transplant, and they are embarrassing in heterogeneous databases. Of course, DBA is nothing more than checking the syntax. But it is inconvenient. Here we will share with you the syntax analysis in the databas
Label:Company leaders want me to lead a file to the Sybase IQ database in a table, the load table statement is as follows:Load table Kyfx_ci_loc (City_name ', ', county_id ci_name ', ', ci_section ', ', ci_id ', ', Ci_longtitude_gps ', ', Ci_latitu De_gps ', ', Ci_longtitude_baidu ', ', Ci_latitude_baidu 0x0a) using fi
During this period, we studied the Sybase MDA monitoring table. During installation, the system always prompts that the loopback service connection is incorrect! Later I found that the loopback service was not provided in the dsedit tool.
After creating the loopback interface, you must execute the statement in iSQL.
First, set the CIS parameter to 1, indicating
Sp_configure
'
Enable CIS
'
,
Tags: Sybase SQL anywhere table information SQLIn Sybase central tools, we can often see the following pages:650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/89/67/wKiom1gRyE_zM-JyAABH3iPUDEM213.png "title=" Sybasecentral001.png "style=" border:1px solid #000000; "alt=" Wkiom1grye_zm-jyaabh3ipudem213.png "/>There was a client who had to export such a
Tags: roc share ACL isnull where SQL _id Simple Object After many times I have verified. Finally, we found a way to query the database structure in Sybase. Before that, I was very puzzled about how this Sybase database is not as easy as Oracle and MySQL. DESC table name; After the online query, get a result. sp_help table
------------tables that cannot be partitioned: system tables, tables in use, temporary tables, and tables with clustered indexes----Checking the Sybase versionSELECT @ @version--View partition status (sp_helpartition default default,system,logsegment)---can see the partition type (Partition_type), the number of partitions (partitions), the fields of the partition (Partition_keys), the number of data (Row_count) per partition,---creation time (create_d
objective of this article: to guide the project side personnel to meet such change requirements, you can refer to the changes themselves. Requirement: Sybase database, normal table T_jingyu modified to partition table by day partition. 1.sp_help View T_jingyu table structure, index and other information?
Current requirement: there is a table A in the database, and table A has four columns: C1 C2 C3 C4; three fields of C1, C2, and C3 for all records in, sort by C1 C2 and export it to the data file.
Specific analysis: Because the SQL statement cannot be added after the BCP in Sybase, you cannot use the BCP out select C1, C2, C4 from a order by C1, C2Method.
Solutio
Tags: mobile com option upd file BFC content name file pathUsage of load table in SybaseWith Sybase IQ as the storage of data warehouse, it does have its unique characteristics and advantages, but in the data ETL, if the use of INSERT, update mode, the speed is too slow, about 2 seconds or so a piece of data. Fortunately, IQ provides a load statement to solve this problem. format of the LOAD statement:[Code
Sybase ASE comes with a command-line tool that exports an object structure: DdlgenFor more detailed usage, refer to: Extracting the definition syntax for an object from an ASE database using DdlgenIf the object structure contains Chinese, use the parameter:-jcp936A more practical use is as follows:1. Export the table structure (including indexes) of all tables in the database tpchdb:ddlgen-usa-psybase123456
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.