Learn about how to get column names of table in sql, we have the largest and most updated how to get column names of table in sql information on alibabacloud.com
Gets the primary key column name of the table SQLSELECT * FROM User_cons_columnswhere constraint_name = (select Constraint_name from user_constraintsWHERE table_name = ' bst_favorite ' and constraint_type = ' P ');Remember : table names are
Often encountered some forget the table name situation, at this time only remember a approximate, at this time can be queried by the system table sysobjects to find the table name, such as to find the name of the table containing the user, can be
Citation: Http://www.2cto.com/database/201209/155178.htmlSQL statement gets all database names, table names, field names, table fields length gets all the tables in the database select Sysobjects.name as Tablename from sysobjects WHERE xtype = ' U '
The code is as follows:
EXEC sp_rename ' table name. [Original column name] ', ' new column name ', ' column '
Transact-SQL Reference
sp_rename
Changes the name of a user-created object (such as a table, column, or user-defined data type) in the
For more information about bugs fixed in SQL Server 2000 Service Pack 4, click the following article number to view the article in the Microsoft Knowledge Base:314128 FIX: When an RPC call is performed, Access with conflicting values includes an
1. Get allDatabase Name: (1) Select name from Master. DBO. sysdatabases order by name2. Get all table names:(1) Select name from sysobjects where xtype = 'U' order by nameXtype = 'U': indicates all user tables;Xtype = 's': indicates all system
Recently, it is necessary to provide the listing data in XML format to Baidu, however, it is unclear whether some items of the required data are in the database. There are many columns in the database, and not every piece of data has data on the
Data from the database in the work to export, but found that the exported Excel column names are field names (in English), to collect data on how to change the field name to Chinese names, and found that Oracle and SQL Server (SQLSERVER2008R2) is
SQL queries all database names, table names, stored procedures, and parameter lists
1. Get all user names: Select name from sysusers where status = '2' and islogin = '1' Islogin = '1' indicates the account
SQL statement that queries all table field properties in a database 1. Get all user names: SELECT name from Sysusers where status= ' 2 ' and islogin= ' 1 ' islogin= ' 1 ' represent account islogin= ' 0 ' table The role status= ' 2 ' indicates that
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.