top button
Flag Notify
Site Registration

What are the String types available for a column in SQL?

+2 votes
386 views
What are the String types available for a column in SQL?
posted Apr 2, 2015 by Vrije Mani Upadhyay

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes
 
Best answer

SQLAlchemy provides abstractions for most common database data types, and a mechanism for specifying your own custom data types.

The methods and attributes of type objects are rarely used directly. Type objects are supplied to Table definitions and can be supplied as type hints to functions for occasions where the database driver returns an incorrect type.

>>> users = Table('users', metadata,
...               Column('id', Integer, primary_key=True)
...               Column('login', String(32))
...              )

SQLAlchemy will use the Integer and String(32) type information when issuing a CREATE TABLE statement and will use it again when reading back rows SELECTed from the database. Functions that accept a type (such as Column()) will typically accept a type class or instance; Integer is equivalent to Integer() with no construction arguments in this case.

For More: http://www.w3schools.com/sql/sql_datatypes_general.asp

answer Apr 2, 2015 by Kali Mishra
Similar Questions
+1 vote

Hai, friends anybody explain the different types of BACKUPs available in SQL Server 2005

+2 votes

I'm trying to connect to a MS SQL Server Express 2005 using PDO for ODBC, but I need the DSN string. I tried with:

$dsn = 'odbc:DRIVER={SQL Server};HOSTNAME=CCTPV608SQLEXPRESS;DATABASE=db_ibripos';

but it doesn't work, please help.

+9 votes

I want one code in SQL Server which will search for a particular string in all the columns of a table

...